TEIID-2467 correcting blocks with lookup and simplifying xml temp logic