After a yield, the underlying namespace may have been dropped and replaced with a view. The lock acquisition in DocumentSourceCursor::loadBatch() will then throw because AutoGetCollectionForRead defaults to prohibiting views. The throwing behavior is correct, but the message is confusing.
Instead, we could acquire locks with view mode AutoGetCollection::ViewMode::kViewsPermitted. This would allow lock acquisition in DocumentSourceCursor::loadBatch() to succeed, and then fail with a much better error message when attempting to use the PlanExecutor, which will be marked as dead because its underlying namespace was dropped.