TEIID-2662 fixing generated sql for internal fbi handling