### Godot version

v4.0.beta17.mono.official [c40020513]

### System information

Window 11, Forward+, GTX 1060

### Issue description

Adding two theme variations in a row result to a  crash.

https://user-images.githubusercontent.com/93253123/217037249-1ce1d56d-beb6-4435-83ad-9f8a07fe0e96.mp4



### Steps to reproduce

1. Create a project.
2. Create a theme.
3. Double click to go in the theme editor.
4. Click on manage items buttons.
5. In the add type field type a name to add a type.
6. type another name to add a second type.
7. Crash.

### Minimal reproduction project

[ThemeVariationCrash.zip](https://github.com/godotengine/godot/files/10665863/ThemeVariationCrash.zip)

set_h_size_flags(SIZE_EXPAND_FILL);
	set_alignment(ALIGNMENT_CENTER);
	first_page_button = memnew(Button);
	first_page_button->set_flat(true);
	first_page_button->connect("pressed", callable_mp(this, &EditorPaginator::_first_page_button_pressed));
	add_child(first_page_button);
	prev_page_button = memnew(Button);
	prev_page_button->set_flat(true);
	prev_page_button->connect("pressed", callable_mp(this, &EditorPaginator::_prev_page_button_pressed));
	add_child(prev_page_button);
	page_line_edit = memnew(LineEdit);
	page_line_edit->connect("text_submitted", callable_mp(this, &EditorPaginator::_page_line_edit_text_submitted));
	page_line_edit->add_theme_constant_override("minimum_character_width", 2);
	add_child(page_line_edit);
	page_count_label = memnew(Label);
	add_child(page_count_label);
	next_page_button = memnew(Button);
	next_page_button->set_flat(true);
	next_page_button->connect("pressed", callable_mp(this, &EditorPaginator::_next_page_button_pressed));
	add_child(next_page_button);
	last_page_button = memnew(Button);
	last_page_button->set_flat(true);
	last_page_button->connect("pressed", callable_mp(this, &EditorPaginator::_last_page_button_pressed));
	add_child(last_page_button);
}
Ref<EditorInspectorPlugin> EditorInspector::inspector_plugins[MAX_PLUGINS];
int EditorInspector::inspector_plugin_count = 0;
EditorProperty *EditorInspector::instantiate_property_editor(Object *p_object, const Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {