Allow sorting by any deterministic expression.

Make it possible to sort by any expression that is deterministic.
Which is to say, any expression that does not contain a call to the rand().

So x+1 will work, but rand()+x or similar will not.