### Godot version

4.0.dev.935a6ef46b7c6af4239b6adce41b8198f051b57a

### System information

macOS 13.1

### Issue description

EDIT: Will be fixed by https://github.com/godotengine/godot/pull/72440

The GLTF importer crashes the engine when importing models from a file at runtime.

I have not traced the issue fully yet, but it was introduced sometime in the last 5 days, between d1e5903c67956707948b1de370b807e3aad395b7 and 935a6ef46b7c6af4239b6adce41b8198f051b57a

```
  ================================================================
  handle_crash: Program crashed with signal 11
  Engine version: Godot Engine v4.0.beta.mirror (024c2181d5173f5b4ebf202dd3252b488ec34bc4)
  Dumping the backtrace. Please include this when reporting the bug to the project developer.
  [1] 1   libsystem_platform.dylib            0x00000001854632a4 _sigtramp + 56
  [2] GLTFDocument::_parse_images(Ref<GLTFState>, String const&) (in godot.macos.editor.arm64) + 9080
  [3] GLTFDocument::_parse_gltf_state(Ref<GLTFState>, String const&) (in godot.macos.editor.arm64) + 684
  [4] GLTFDocument::_parse(Ref<GLTFState>, String, Ref<FileAccess>) (in godot.macos.editor.arm64) + 1976
  [5] GLTFDocument::append_from_file(String, Ref<GLTFState>, unsigned int, String) (in godot.macos.editor.arm64) + 780
```

Full stack trace:

<details>

```
  ================================================================
  handle_crash: Program crashed with signal 11
  Engine version: Godot Engine v4.0.beta.mirror (024c2181d5173f5b4ebf202dd3252b488ec34bc4)
  Dumping the backtrace. Please include this when reporting the bug to the project developer.
  [1] 1   libsystem_platform.dylib            0x00000001854632a4 _sigtramp + 56
  [2] GLTFDocument::_parse_images(Ref<GLTFState>, String const&) (in godot.macos.editor.arm64) + 9080
  [3] GLTFDocument::_parse_gltf_state(Ref<GLTFState>, String const&) (in godot.macos.editor.arm64) + 684
  [4] GLTFDocument::_parse(Ref<GLTFState>, String, Ref<FileAccess>) (in godot.macos.editor.arm64) + 1976
  [5] GLTFDocument::append_from_file(String, Ref<GLTFState>, unsigned int, String) (in godot.macos.editor.arm64) + 780
  [6] GLTFDocument::_parse_gltf_extensions(Ref<GLTFState>)
  [7] GLTFDocument::_parse_gltf_extensions(Ref<GLTFState>)
  [8] GLTFDocument::_parse_gltf_extensions(Ref<GLTFState>)
  [9] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Callable::CallError&, GDScriptFunction::CallState*) (in godot.macos.editor.arm64) + 73812
  [10] Variant::callp(StringName const&, Variant const**, int, Variant&, Callable::CallError&) (in godot.macos.editor.arm64) + 228
  [11] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Callable::CallError&, GDScriptFunction::CallState*) (in godot.macos.editor.arm64) + 63144
  [12] GDScriptInstance::callp(StringName const&, Variant const**, int, Callable::CallError&) (in godot.macos.editor.arm64) + 348
  [13] Object::callp(StringName const&, Variant const**, int, Callable::CallError&) (in godot.macos.editor.arm64) + 188
  [14] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (in godot.macos.editor.arm64) + 176
  [15] CallableCustomBind::call(Variant const**, int, Variant&, Callable::CallError&) const (in godot.macos.editor.arm64) + 452
  [16] core_bind::Thread::_start_func(void*) (in godot.macos.editor.arm64) + 552
  [17] Thread::callback(Thread*, Thread::Settings const&, void (*)(void*), void*) (in godot.macos.editor.arm64) + 176
  [18] Thread::~Thread()
  [19] 19  libsystem_pthread.dylib             0x000000018543506c _pthread_start + 148
```

</details>

### Steps to reproduce

Occurs when importing GLTF models at runtime. The same models import correctly when placed in the `res://` folder and imported by the editor. I will try to isolate this to a single model (or maybe it occurs on all? dunno yet).

### Minimal reproduction project

It occurs on my company's project, I will try to reproduce it in a smaller project, but wanted to open this issue ASAP in case someone already has an idea of what would be causing this.
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "primitive/radius", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1.0));
			r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "primitive/position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), Vector3()));
			r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "primitive/rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), Vector3()));
			r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/occluder", PROPERTY_HINT_ENUM, "Disabled,Mesh + Occluder,Occluder Only", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
			r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "occluder/simplification_distance", PROPERTY_HINT_RANGE, "0.0,2.0,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0.1f));
		} break;
		case INTERNAL_IMPORT_CATEGORY_MESH: {
			r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
			r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "save_to_file/path", PROPERTY_HINT_SAVE_FILE, "*.res,*.tres"), ""));
			r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/make_streamable"), ""));
			r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/shadow_meshes", PROPERTY_HINT_ENUM, "Default,Enable,Disable"), 0));
			r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/lightmap_uv", PROPERTY_HINT_ENUM, "Default,Enable,Disable"), 0));
			r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/lods", PROPERTY_HINT_ENUM, "Default,Enable,Disable"), 0));
			r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "lods/normal_split_angle", PROPERTY_HINT_RANGE, "0,180,0.1,degrees"), 25.0f));
			r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "lods/normal_merge_angle", PROPERTY_HINT_RANGE, "0,180,0.1,degrees"), 60.0f));
		} break;
		case INTERNAL_IMPORT_CATEGORY_MATERIAL: {
			r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "use_external/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
			r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "use_external/path", PROPERTY_HINT_FILE, "*.material,*.res,*.tres"), ""));
		} break;
		case INTERNAL_IMPORT_CATEGORY_ANIMATION: {
			r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "settings/loop_mode", PROPERTY_HINT_ENUM, "None,Linear,Pingpong"), 0));
			r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
			r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "save_to_file/path", PROPERTY_HINT_SAVE_FILE, "*.res,*.tres"), ""));
			r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/keep_custom_tracks"), ""));
			r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slices/amount", PROPERTY_HINT_RANGE, "0,256,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
			for (int i = 0; i < 256; i++) {
				r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/name"), ""));
				r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/start_frame"), 0));
				r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/end_frame"), 0));