### 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
docs.clear();
	doc = DocData::ClassDoc();
}
void GDScript::_update_doc() {
	_clear_doc();
	doc.script_path = vformat(R"("%s")", get_script_path().get_slice("://", 1));
	if (!name.is_empty()) {
		doc.name = name;
	} else {
		doc.name = doc.script_path;
	}
	if (_owner) {
		doc.name = _owner->doc.name + "." + doc.name;
		doc.script_path = doc.script_path + "." + doc.name;
	}
	doc.is_script_doc = true;
	if (base.is_valid() && base->is_valid()) {
		if (!base->doc.name.is_empty()) {
			doc.inherits = base->doc.name;
		} else {
			doc.inherits = base->get_instance_base_type();
		}
	} else if (native.is_valid()) {
		doc.inherits = native->get_name();
	}
	doc.brief_description = doc_brief_description;
	doc.description = doc_description;
	doc.tutorials = doc_tutorials;