Fix sorting by retry counts.