[Dependency] Fix Container.leaveScope()