### 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 if (local_type.kind == GDScriptDataType::BUILTIN) {
						codegen.generator->write_construct(local, local_type.builtin_type, Vector<GDScriptCodeGenerator::Address>());
						initialized = true;
					}
					
				}
				
				if (!initialized && p_block->is_in_loop) {
					codegen.generator->write_construct(local, Variant::NIL, Vector<GDScriptCodeGenerator::Address>());
				}
			} break;
			case GDScriptParser::Node::CONSTANT: {
				
				const GDScriptParser::ConstantNode *lc = static_cast<const GDScriptParser::ConstantNode *>(s);
				if (!lc->initializer->is_constant) {
					_set_error("Local constant must have a constant value as initializer.", lc->initializer);
					return ERR_PARSE_ERROR;
				}
				codegen.add_local_constant(lc->identifier->name, lc->initializer->reduced_value);
			} break;
			case GDScriptParser::Node::PASS:
				
				break;
			default: {
				
				if (s->is_expression()) {
					GDScriptCodeGenerator::Address expr = _parse_expression(codegen, err, static_cast<const GDScriptParser::ExpressionNode *>(s), true);
					if (err) {
						return err;
					}