Re-order dependencies.