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

Resource *res = Object::cast_to<Resource>(object);
				if (res) {
					all_read_only = EditorNode::get_singleton()->is_resource_read_only(res);
				}
			}
		}
	}
	String filter = search_box ? search_box->get_text() : "";
	String group;
	String group_base;
	String subgroup;
	String subgroup_base;
	int section_depth = 0;
	VBoxContainer *category_vbox = nullptr;
	List<PropertyInfo> plist;
	object->get_property_list(&plist, true);
	HashMap<VBoxContainer *, HashMap<String, VBoxContainer *>> vbox_per_path;
	HashMap<String, EditorInspectorArray *> editor_inspector_array_per_prefix;
	Color sscolor = get_theme_color(SNAME("prop_subsection"), SNAME("Editor"));
	
	for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
		ped->parse_begin(object);
		_parse_added_editors(main_vbox, nullptr, ped);
	}
	StringName doc_name;
	
	for (List<PropertyInfo>::Element *E_property = plist.front(); E_property; E_property = E_property->next()) {
		PropertyInfo &p = E_property->get();
		if (p.usage & PROPERTY_USAGE_SUBGROUP) {