Fix OPCODE_DISCARD handling
Test updates