TEIID-3025 correcting subquery in order by handling