Fix intermittent failure on test_sort_by_region
Merge pull request #586 from bobsilverberg/sort_by_fix

Fix intermittent failure on test_sort_by_region