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