Eng 4155 Make determinism checks more accurate.

Specifically targets detecting when an order by clause results in deterministic order.