Fix invalid ORDER BY hash key test