Fix sorting (by loop count) of phrase names in log file that is produced when, otherwise, there would be an endless loop