### Godot version

4.2 (c5da2e54fe50cad34b5f93fa10538978b33af88d)

### System information

Windows 11

### Issue description

Attempting to run a scene with the following script report Identifier not found error:

![image](https://github.com/godotengine/godot/assets/3036176/3a63b930-0588-499d-80a2-4f88f5f07116)

This does not happen on 4.1.1 so this is a regression.

### Steps to reproduce

Create a script derived from Control and try to get access to the mouse_entered signal.

### Minimal reproduction project

[TestBug.zip](https://github.com/godotengine/godot/files/12237764/TestBug.zip)

} else {
				
				codegen.generator->write_assign(p_previous_test, result_addr);
			}
			codegen.generator->pop_temporary(); 
			return p_previous_test;
		} break;
		case GDScriptParser::PatternNode::PT_DICTIONARY: {
			if (p_is_nested) {
				codegen.generator->write_and_left_operand(p_previous_test);
			} else if (!p_is_first) {
				codegen.generator->write_or_left_operand(p_previous_test);
			}
			
			GDScriptCodeGenerator::Address dict_type_addr = codegen.add_constant((int)Variant::DICTIONARY);
			
			GDScriptDataType temp_type;
			temp_type.has_type = true;
			temp_type.kind = GDScriptDataType::BUILTIN;
			temp_type.builtin_type = Variant::BOOL;
			
			GDScriptCodeGenerator::Address result_addr = codegen.add_temporary(temp_type);
			codegen.generator->write_binary_operator(result_addr, Variant::OP_EQUAL, p_type_addr, dict_type_addr);
			codegen.generator->write_and_left_operand(result_addr);
			
			GDScriptCodeGenerator::Address dict_length_addr = codegen.add_constant(p_pattern->rest_used ? p_pattern->dictionary.size() - 1 : p_pattern->dictionary.size());
			
			temp_type.builtin_type = Variant::INT;
			GDScriptCodeGenerator::Address value_length_addr = codegen.add_temporary(temp_type);
			Vector<GDScriptCodeGenerator::Address> func_args;