".Project_library" gets unloaded after creating a new project inside another project's folder. Also happens when loading loading the schematic/board settings.

Description

I have discovered a somewhat annoying bug that has to do with the creation of new projects that are located in a folder that already contains other projects. My usecase is to be able to panelize multiple boards using a plugin that requires a global project with all hierarchical schematics that need different boards to be created as individual projects.

Anyways, when I create a new project using the name of a hierarchical schematic, like I usually do, I expect the project to be naked in settings, but at least have the schematic of the hierarchical schematic of the global project. Thereafter, I go to import the settings of another board in EEschema, and puff goes the .Project_Library, it gets unloaded. Now if I run ERC it complains about unknown footprints.

The same goes for PCBNew when importing the board settings from the global project. The .Project_Library gets unloaded. Since I store my 3D models in the project library, the 3D viewer says that the paths have an error.

My solution in the meantime is to save, close, and reopen KiCAD to reload everything anew.

Steps to reproduce

explorer_PMZ57AeyiV.mp4

KiCad Version

Application: KiCad PCB Editor x64 on x64

Version: 7.99.0-3657-g5cf244dd90, release build

Libraries:
	wxWidgets 3.2.4
	FreeType 2.12.1
	HarfBuzz 8.2.1
	FontConfig 2.14.2

Platform: Windows 11 (build 22631), 64-bit edition, 64 bit, Little endian, wxMSW

	wxWidgets: 3.2.4 (wchar_t,wx containers)
	Boost: 1.83.0
	OCC: 7.7.1
	Curl: 8.4.0-DEV
	ngspice: 41
	Compiler: Visual C++ 1936 without C++ ABI

Build settings:
Edited by Andrei Alexandru Tatar Duma