Fix ordinal domain sorting (#184).