### 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)

if (current_selected && ep->property == current_selected) {
					ep->select(current_focusable);
				}
			}
		}
	}
	if (!hide_metadata && !object->call("_hide_metadata_from_inspector")) {
		
		Control *spacer = memnew(Control);
		spacer->set_custom_minimum_size(Size2(0, 4) * EDSCALE);
		main_vbox->add_child(spacer);
		Button *add_md = EditorInspector::create_inspector_action_button(TTR("Add Metadata"));
		add_md->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
		add_md->connect(SNAME("pressed"), callable_mp(this, &EditorInspector::_show_add_meta_dialog));
		main_vbox->add_child(add_md);
		if (all_read_only) {
			add_md->set_disabled(true);
		}
	}
	
	for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
		ped->parse_end(object);
		_parse_added_editors(main_vbox, nullptr, ped);
	}
	if (_is_main_editor_inspector()) {
		
		EditorNode::get_singleton()->hide_unused_editors();
	}
}
void EditorInspector::update_property(const String &p_prop) {