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

void set_keying(bool p_keying);
	bool is_keying() const;
	void set_deletable(bool p_enable);
	bool is_deletable() const;
	void add_focusable(Control *p_control);
	void select(int p_focusable = -1);
	void deselect();
	bool is_selected() const;
	void set_label_reference(Control *p_control);
	void set_bottom_editor(Control *p_control);
	void set_use_folding(bool p_use_folding);
	bool is_using_folding() const;
	virtual void expand_all_folding();
	virtual void collapse_all_folding();
	virtual void expand_revertable();
	virtual Variant get_drag_data(const Point2 &p_point) override;
	virtual void update_cache();
	virtual bool is_cache_valid() const;
	void set_selectable(bool p_selectable);
	bool is_selectable() const;
	void set_name_split_ratio(float p_ratio);
	float get_name_split_ratio() const;
	void set_object_and_property(Object *p_object, const StringName &p_property);
	virtual Control *make_custom_tooltip(const String &p_text) const override;
	void set_draw_top_bg(bool p_draw) { draw_top_bg = p_draw; }
	bool can_revert_to_default() const { return can_revert; }
	void menu_option(int p_option);
	EditorProperty();
};
class EditorInspectorPlugin : public RefCounted {