Jit64: implement tw/twi more accurately

Fixes issue 7253.