State.order_chunks(): sort only once instead of twice
Merge pull request #5125 from hulu/avoid-double-sort

State.order_chunks(): sort only once instead of twice