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

VBoxContainer *items_tab = memnew(VBoxContainer);
	items_tab->set_custom_minimum_size(Size2(0, 160) * EDSCALE);
	data_type_tabs->add_child(items_tab);
	data_type_tabs->set_tab_title(data_type_tabs->get_tab_count() - 1, "");
	ScrollContainer *items_sc = memnew(ScrollContainer);
	items_sc->set_v_size_flags(SIZE_EXPAND_FILL);
	items_sc->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
	items_tab->add_child(items_sc);
	VBoxContainer *items_list = memnew(VBoxContainer);
	items_list->set_h_size_flags(SIZE_EXPAND_FILL);
	items_sc->add_child(items_list);
	HBoxContainer *item_add_hb = memnew(HBoxContainer);
	items_tab->add_child(item_add_hb);
	LineEdit *item_add_edit = memnew(LineEdit);
	item_add_edit->set_h_size_flags(SIZE_EXPAND_FILL);
	item_add_hb->add_child(item_add_edit);
	item_add_edit->connect("text_submitted", callable_mp(this, &ThemeTypeEditor::_item_add_lineedit_cbk).bind(p_data_type, item_add_edit));
	Button *item_add_button = memnew(Button);
	item_add_button->set_text(TTR("Add"));
	item_add_hb->add_child(item_add_button);
	item_add_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_add_cbk).bind(p_data_type, item_add_edit));
	return items_list;
}
void ThemeTypeEditor::_update_type_list() {