Replace if statement with lazy initialization in relocate_opcode()