Fix order_by on empty sequences.

It fixes #2307 but not sure it's ok, test ql-py-polyglot passed though.