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

add_default_items_button->set_text(TTR("Override All"));
	add_default_items_button->set_tooltip_text(TTR("Override all default type items."));
	type_controls->add_child(add_default_items_button);
	add_default_items_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_add_default_type_items));
	data_type_tabs = memnew(TabContainer);
	data_type_tabs->set_tab_alignment(TabBar::ALIGNMENT_CENTER);
	main_vb->add_child(data_type_tabs);
	data_type_tabs->set_v_size_flags(SIZE_EXPAND_FILL);
	data_type_tabs->set_use_hidden_tabs_for_min_size(true);
	data_type_tabs->set_theme_type_variation("TabContainerOdd");
	color_items_list = _create_item_list(Theme::DATA_TYPE_COLOR);
	constant_items_list = _create_item_list(Theme::DATA_TYPE_CONSTANT);
	font_items_list = _create_item_list(Theme::DATA_TYPE_FONT);
	font_size_items_list = _create_item_list(Theme::DATA_TYPE_FONT_SIZE);
	icon_items_list = _create_item_list(Theme::DATA_TYPE_ICON);
	stylebox_items_list = _create_item_list(Theme::DATA_TYPE_STYLEBOX);
	VBoxContainer *type_settings_tab = memnew(VBoxContainer);
	type_settings_tab->set_custom_minimum_size(Size2(0, 160) * EDSCALE);
	data_type_tabs->add_child(type_settings_tab);
	data_type_tabs->set_tab_title(data_type_tabs->get_tab_count() - 1, "");
	ScrollContainer *type_settings_sc = memnew(ScrollContainer);
	type_settings_sc->set_v_size_flags(SIZE_EXPAND_FILL);
	type_settings_sc->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
	type_settings_tab->add_child(type_settings_sc);
	VBoxContainer *type_settings_list = memnew(VBoxContainer);
	type_settings_list->set_h_size_flags(SIZE_EXPAND_FILL);
	type_settings_sc->add_child(type_settings_list);
	VBoxContainer *type_variation_vb = memnew(VBoxContainer);
	type_settings_list->add_child(type_variation_vb);
	HBoxContainer *type_variation_hb = memnew(HBoxContainer);