### 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
RBSet<GDScript *> dependencies = get_dependencies();
	RBSet<GDScript *> must_clear_dependencies;
	HashMap<GDScript *, RBSet<GDScript *>> inverted_dependencies;
	for (GDScript *E : dependencies) {
		inverted_dependencies.insert(E, E->get_inverted_dependencies());
	}
	RBSet<GDScript *> cant_clear;
	for (KeyValue<GDScript *, RBSet<GDScript *>> &E : inverted_dependencies) {
		for (GDScript *F : E.value) {
			if (!dependencies.has(F)) {
				cant_clear.insert(E.key);
				for (GDScript *G : E.key->get_dependencies()) {
					cant_clear.insert(G);
				}
				break;
			}
		}
	}
	for (KeyValue<GDScript *, RBSet<GDScript *>> &E : inverted_dependencies) {
		if (cant_clear.has(E.key) || ScriptServer::is_global_class(E.key->get_fully_qualified_name())) {
			continue;
		}
		must_clear_dependencies.insert(E.key);
	}
	cant_clear.clear();
	dependencies.clear();
	inverted_dependencies.clear();
	return must_clear_dependencies;
}
bool GDScript::has_script_signal(const StringName &p_signal) const {