Fix BSON serialization bug with UserDefinedSubtype and BSONMinKey