Fix issue #34 (deadlock) and MissingDependencies getting into invalid state