Fix simple emit

Fix a spurious LOAD bytecode when using the "emit" instruction, and fix a memory leak caused by this patch.