### 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
}
	
	for (int i = 1; result != nullptr && i < class_names.size(); i++) {
		String current_name = class_names[i];
		if (HashMap<StringName, Ref<GDScript>>::Iterator E = result->subclasses.find(current_name)) {
			result = E->value.ptr();
		} else {
			
			return nullptr;
		}
	}
	return result;
}
bool GDScript::has_class(const GDScript *p_script) {
	String fqn = p_script->fully_qualified_name;
	if (fully_qualified_name.is_empty() && fqn.get_slice("::", 0).is_empty()) {
		return p_script == this;
	} else if (fqn.begins_with(fully_qualified_name)) {
		return p_script == find_class(fqn.trim_prefix(fully_qualified_name));
	}
	return false;
}
GDScript *GDScript::get_root_script() {
	GDScript *result = this;
	while (result->_owner) {
		result = result->_owner;
	}
	return result;
}
RBSet<GDScript *> GDScript::get_dependencies() {