SERVER-8046 Fix broken mutable bson algorithm