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

new_size_spin_box->set_value(count);
			resize_dialog->get_ok_button()->set_disabled(true);
			resize_dialog->popup_centered(Size2(250, 0) * EDSCALE);
			new_size_spin_box->get_line_edit()->grab_focus();
			new_size_spin_box->get_line_edit()->select_all();
			break;
		default:
			break;
	}
}
void EditorInspectorArray::_control_dropping_draw() {
	int drop_position = _drop_position();
	if (dropping && drop_position >= 0) {
		Vector2 from;
		Vector2 to;
		if (drop_position < elements_vbox->get_child_count()) {
			Transform2D xform = Object::cast_to<Control>(elements_vbox->get_child(drop_position))->get_transform();
			from = xform.xform(Vector2());
			to = xform.xform(Vector2(elements_vbox->get_size().x, 0));
		} else {
			Control *child = Object::cast_to<Control>(elements_vbox->get_child(drop_position - 1));
			Transform2D xform = child->get_transform();
			from = xform.xform(Vector2(0, child->get_size().y));
			to = xform.xform(Vector2(elements_vbox->get_size().x, child->get_size().y));
		}
		Color color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
		control_dropping->draw_line(from, to, color, 2);
	}
}
void EditorInspectorArray::_vbox_visibility_changed() {