Don't escape sortorder if it is for RAND() or RANDOM()
Merge pull request #980 from GawainLynch/hotfixes/RAND

Don't escape sortorder if it is for RAND() or RANDOM()