Reorder dependencies.