Various smallish JIT optimizations

See the individual commits for details.