### 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
const GDScript *current = this;
	while (current) {
		for (const KeyValue<StringName, GDScriptFunction *> &E : current->member_functions) {
			GDScriptFunction *func = E.value;
			MethodInfo mi;
			mi.name = E.key;
			if (func->is_static()) {
				mi.flags |= METHOD_FLAG_STATIC;
			}
			for (int i = 0; i < func->get_argument_count(); i++) {
				PropertyInfo arginfo = func->get_argument_type(i);
#ifdef TOOLS_ENABLED
				arginfo.name = func->get_argument_name(i);
#endif
				mi.arguments.push_back(arginfo);
			}
#ifdef TOOLS_ENABLED
			mi.default_arguments.append_array(func->get_default_arg_values());
#endif
			mi.return_val = func->get_return_type();
			r_list->push_back(mi);
		}
		if (!p_include_base) {
			return;
		}
		current = current->_base;
	}
}
void GDScript::get_script_method_list(List<MethodInfo> *r_list) const {