Due to an assumption ascertained from Replication code with a bug (see
SERVER-40248), we select from the incorrect field when applying update operations from a multi-statement transaction. We should be applying from the o field, not the o2 field.
We should also make sure that current testing is up-to-par for this opObserver – basic testing should have caught this bug.
It turns out that this bug actually isn't a bug, but for reasons previously unknown. For inserts and updates, the migration cloner transfer mods stage assumes that we are given only the _id, and reaches into the storage subsystem to retrieve the full document. The document that we pass into the cloner on transaction commit is exactly that – the _id. So the code is correct, but variables are named incorrectly.