There are several issues with the current imported layer management: * Imported layers are associated with a single layer, however given the unique name rule if another project wishes to use that same layer it must use a different name. * The 'local_source_dir' is only set in a layer if it already has a value See also Bug 12818 - Remove orphaned imported layers when project is deleted.
commit 08fbdc02e32d715ae94e3b9603fb3ec8351c8fd3