### Godot version

4.0.beta10

### System information

Windows 11

### Issue description
UPDATE: This problem only occurs when the source code contains inner classes

Before 4.0.Beta9, I could get a GDScript instance by `GDScript.new()` and then set the `source_code` property and then `reload()`, but now it throws an error 
```
USER SCRIPT ERROR: Parse Error: Could not find script "".
   at: GDScript::reload (built-in:1644)
```
In my software, I use the above method when the user modifies the code text, and then read the godot log to implement real-time error checking of the custom user script editor. But now this functionality is completely broken

### Steps to reproduce

1. Create a GDScript instance by `GDScript.new()`
2. set the `source_code` property and then `reload()`

### Minimal reproduction project

N/A
p_clear_data->scripts.insert(gdscr);
		}
	}
	constants.clear();
	
	for (int i = 0; i < weak_subclasses.size(); i++) {
		ClassRefWithName subclass = weak_subclasses[i];
		Object *obj = ObjectDB::get_instance(subclass.id);
		if (!obj) {
			continue;
		}
		
		GDScriptLanguage::get_singleton()->add_orphan_subclass(subclass.fully_qualified_name, subclass.id);
	}
}
void GDScript::_init_rpc_methods_properties() {
	
	rpc_config.clear();
	if (base.is_valid()) {
		rpc_config = base->rpc_config.duplicate();
	}
	
	for (KeyValue<StringName, GDScriptFunction *> &E : member_functions) {
		Variant config = E.value->get_rpc_config();
		if (config.get_type() != Variant::NIL) {
			rpc_config[E.value->get_name()] = config;
		}
	}
}
void GDScript::clear(GDScript::ClearData *p_clear_data) {