TEIID-247 correcting multidimensional casting