Even if there is no guarantee, perhaps one can assume that the order is roughly ascending. Improving cache efficiency helps with performance, but even if the order is different, the program would still give the correct result.
Another possibility is to take the block position not from the block index, but by determining at runtime, e.g. by increasing a global atomic value with each block. So the number is assigned in runtime order.