Always set x_sort_order

Fix for issue #119 and test for same.