traiter: correctly sort rows in increasing order of largest coefficient