Fixed an issue where reloading of removed dependencies would cause an un...

This resolves #13958