Backport of PDI-11223 - Getting duplicate ID errors while doing batch inserts to MongoDB (5.0)