This change tracks change in rev 1.25 of sort.c by Christos Zoulas. While here, improve error messages slighly.