TEIID-2500 fix for inappropriate case rewrite