The ScopedDbConnection constructor can throw if it needs to create a new connection and something goes wrong. The constructor isn't protected by a try/catch when we send our _recvChunkCommit command, so this can rarely fail in a way that does not reset shard version.
Manifests as "shard global version for collection is higher than trying to set" messages. Workaround is to stepDown or restart the shard primary.