Added secondary sort key to categorical label sorter