TEIID-2864 fixing with clause placement