ENG-5986: fix for possible dup row in insert.