Adds ensureIndex after insert transaction.