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

ae.move_texture_rect->set_default_cursor_shape(Control::CURSOR_MOVE);
			if (is_inside_tree()) {
				ae.move_texture_rect->set_texture(get_theme_icon(SNAME("TripleBar"), SNAME("EditorIcons")));
			}
			ae.hbox->add_child(ae.move_texture_rect);
		}
		if (numbered) {
			ae.number = memnew(Label);
			ae.number->add_theme_font_override("font", numbers_font);
			ae.number->set_custom_minimum_size(Size2(numbers_min_w, 0));
			ae.number->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
			ae.number->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
			ae.number->set_text(itos(begin_array_index + i));
			ae.hbox->add_child(ae.number);
		}
		
		ae.vbox = memnew(VBoxContainer);
		ae.vbox->set_h_size_flags(SIZE_EXPAND_FILL);
		ae.vbox->set_v_size_flags(SIZE_EXPAND_FILL);
		ae.hbox->add_child(ae.vbox);
		ae.erase = memnew(Button);
		ae.erase->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
		ae.erase->set_v_size_flags(SIZE_SHRINK_CENTER);
		ae.erase->connect("pressed", callable_mp(this, &EditorInspectorArray::_remove_item).bind(begin_array_index + i));
		ae.hbox->add_child(ae.erase);
	}
	
	add_button->set_visible(page == max_page);
	
	if (max_page > 0) {