Sort is now done at the beginning of each phase.