TEIID-3191 correcting global temp key logic