Optimize ORDER BY out when salted if order preserving, fix associated unit tests