TEIID-2443 ensuring proper having behavior