fix duplicate when updating freshly inserted element
Merge branch 'AGIOS-134'