TEIID-3050 refining insert logic