Early bail for dependencies
Factored out dependencies code