### 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
return p_type == "GDScript";
}
String GDScriptLanguage::get_global_class_name(const String &p_path, String *r_base_type, String *r_icon_path) const {
	Vector<uint8_t> sourcef;
	Error err;
	Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ, &err);
	if (err) {
		return String();
	}
	String source = f->get_as_utf8_string();
	GDScriptParser parser;
	err = parser.parse(source, p_path, false);
	
	if (err == OK) {
		const GDScriptParser::ClassNode *c = parser.get_tree();
		if (r_icon_path) {
			if (c->icon_path.is_empty() || c->icon_path.is_absolute_path()) {
				*r_icon_path = c->icon_path;
			} else if (c->icon_path.is_relative_path()) {
				*r_icon_path = p_path.get_base_dir().path_join(c->icon_path).simplify_path();
			}
		}
		if (r_base_type) {
			const GDScriptParser::ClassNode *subclass = c;
			String path = p_path;
			GDScriptParser subparser;
			while (subclass) {
				if (subclass->extends_used) {
					if (!subclass->extends_path.is_empty()) {