Imagine we have the following SBE plan:
Basically, we are collecting some values into ArraySet in s12, make a reference to s12 with s13 and then unwind ArraySet from s13.
Now imagine that after unwinding first N elements, yield happens. All values in the tree will be copied, including the value behind s13. Unwind will update its reference to ArraySet to point to the freshly copied value and skip first N elements. The problem is, we have no guarantee that these N elements are in fact the same elements produced before, since ArraySet does not have ordering guarantees.
Since all non-BSON values are always owned by the SBE tree, it makes sense to copy only BSON values during yielding. This will also solve the problem outlined above.