I don’t have an obvious solution to your case, but it is also killing me ![]()
I found that moving 100% to site sets is the sanest approach. With anything loaded from ext_localconf.php or (god beware) from the DB you cannot get into the Site Set Stack where you might need it. That is hard in practice where some extensions don’t use Site Sets yet (which means I make a wrapper for them to load them as Site Set). (And if 3rd party extensions load something themselves in ext_localconf.php, it gets insane).
And then add a dependency from every place where you overwrite something in a Site Set to the original place. And don’t include that original place somewhere else…