### Godot version

4.1 beta2

### System information

Windows 10 Home

### Issue description

I had a control with a custom theme which i removed. When loading the project again the Theme Editor is opened and some actions, like Show Default or Override All, cause the editor to crash.

### Steps to reproduce

1. create a scene with a Control node
2. add a custom theme to it
3. click the theme so the Theme Editor opens
4. remove the theme
5. save the scene
6. close the project and open it again (Theme Editor needs to be opened when closing the project)
7. click Show Default or Override All

### Minimal reproduction project

[Godot41_themeEditorCrash.zip](https://github.com/godotengine/godot/files/11760454/Godot41_themeEditorCrash.zip)

HashMap<Node *, Node *> ownership_table;
	};
	struct ConnectionWithNodePath {
		Connection connection;
		NodePath node_path;
	};
	struct ModificationNodeEntry {
		HashMap<StringName, Variant> property_table;
		List<ConnectionWithNodePath> connections_to;
		List<Connection> connections_from;
		List<Node::GroupInfo> groups;
	};
	void update_ownership_table_for_addition_node_ancestors(Node *p_current_node, HashMap<Node *, Node *> &p_ownership_table);
	void update_diff_data_for_node(
			Node *p_edited_scene,
			Node *p_root,
			Node *p_node,
			HashMap<NodePath, ModificationNodeEntry> &p_modification_table,
			List<AdditiveNodeEntry> &p_addition_list);
	bool is_scene_open(const String &p_path);
	void set_current_scene(int p_idx);
	void setup_color_picker(ColorPicker *p_picker);
	void request_instantiate_scene(const String &p_path);
	void request_instantiate_scenes(const Vector<String> &p_files);
	void set_convert_old_scene(bool p_old) { convert_old = p_old; }
	void notify_all_debug_sessions_exited();
	OS::ProcessID has_child_process(OS::ProcessID p_pid) const;
	void stop_child_process(OS::ProcessID p_pid);
	Ref<Theme> get_editor_theme() const { return theme; }