If an AVM2Code object is empty, and we attempt to insert an instruction, the method will execute code.get(-1) and throw an exception. This commit handles the situation.
Some obfuscators will scatter the instructions:
pushtrue
pop
or:
pushfalse
pop
randomly throughout the P-code. As any push instruction immediately followed by a pop instruction must be a no-op, they are removed.