Fix assertion errors with MCJIT during codegen tests