Jit recompile with new arguments

The solution I ended up using is written here.