Refactor opcode rewrites to be expressive of their intent

Opcode rewrites should probably not be occurring, but if they are then they should do exactly what they purport to do. These changes prepare the codebase for the introduction of new opcodes that may change the index-based positions of opcodes that these rewrites expect.