When a user executes applyOps with an update on the primary, this is treated as an upsert by default, therefore when the applyOps oplog entry is replayed on the secondary during initial sync it should also be treated as an upsert. However, it is not.
Fetching missing documents masks this bug, for now (see
SERVER-42022). After this change, we no longer fetch missing documents when applying an applyOps oplog entry during initial sync, and initial sync still succeeds.