### 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.
const Color DIELECTRIC_SPECULAR = Color(0.04f, 0.04f, 0.04f);
	Color specular = Color(p_specular_factor.r, p_specular_factor.g, p_specular_factor.b);
	const float one_minus_specular_strength = 1.0f - get_max_component(specular);
	const float dielectric_specular_red = DIELECTRIC_SPECULAR.r;
	float brightness_diffuse = get_perceived_brightness(p_diffuse);
	const float brightness_specular = get_perceived_brightness(specular);
	r_metallic = solve_metallic(dielectric_specular_red, brightness_diffuse, brightness_specular, one_minus_specular_strength);
	const float one_minus_metallic = 1.0f - r_metallic;
	const Color base_color_from_diffuse = p_diffuse * (one_minus_specular_strength / (1.0f - dielectric_specular_red) / MAX(one_minus_metallic, CMP_EPSILON));
	const Color base_color_from_specular = (specular - (DIELECTRIC_SPECULAR * (one_minus_metallic))) * (1.0f / MAX(r_metallic, CMP_EPSILON));
	r_base_color.r = Math::lerp(base_color_from_diffuse.r, base_color_from_specular.r, r_metallic * r_metallic);
	r_base_color.g = Math::lerp(base_color_from_diffuse.g, base_color_from_specular.g, r_metallic * r_metallic);
	r_base_color.b = Math::lerp(base_color_from_diffuse.b, base_color_from_specular.b, r_metallic * r_metallic);
	r_base_color.a = p_diffuse.a;
	r_base_color = r_base_color.clamp();
}
GLTFNodeIndex GLTFDocument::_find_highest_node(Ref<GLTFState> p_state, const Vector<GLTFNodeIndex> &p_subset) {
	int highest = -1;
	GLTFNodeIndex best_node = -1;
	for (int i = 0; i < p_subset.size(); ++i) {
		const GLTFNodeIndex node_i = p_subset[i];
		const Ref<GLTFNode> node = p_state->nodes[node_i];
		if (highest == -1 || node->height < highest) {
			highest = node->height;
			best_node = node_i;
		}
	}
	return best_node;
}
bool GLTFDocument::_capture_nodes_in_skin(Ref<GLTFState> p_state, Ref<GLTFSkin> p_skin, const GLTFNodeIndex p_node_index) {