Codegen fixes for pointer equality