Update Container.php

Fix resolveDependencies issue when building new classes