We should be careful when doing this to preserve the invariant expected in BtreeBucket::advance() that every bucket has at least one key. (Or alternatively we could make the invariant more flexible).
FYI looks like there is a higher level guard in place to prevent the the background operation/dropping issue I described above.
Message: SERVER-366 clean up a bit in pack()
I've implemented everything in the description. Let me know if we need anything more.
Message: SERVER-366 don't drop referenced key
Message: SERVER-366 pos can be n