Implement and debug sorterNormalizeSortFieldRegular. Fix other bugs.