This function is used when BulkWrite::insert() does not return a generated
ID, which means that the ID should be fetched from an array offset, public
property, or in the data returned by bsonSerialize().
See also:
https://jira.mongodb.org/browse/PHPC-382