Move checks for references into slow paths of handlers or helpers. Remove duplicate opcode handlers.