TEIID-3009 expanding with discovery to all subqueries