TEIID-3106 preventing a tight loop