Properly order dependencies.