 
   mutating func visitSingularMessageField<M: Message>(value: M,
                                              fieldNumber: Int) throws {
-    // Can force partial to true here because the parent message would have
-    // already recursed for the isInitialized check if it was needed.
-    let t = try value.serializedData(partial: true)
-    encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited)
-    encoder.putBytesValue(value: t)
+    encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited)
+    let length = try value.serializedDataSize()
+    encoder.putVarInt(value: length)
+    try value.traverse(visitor: &self)
   }
 
   mutating func visitSingularGroupField<G: Message>(value: G, fieldNumber: Int) throws {

    encoder = BinaryEncoder(forWritingInto: pointer)
  }

  mutating func visitUnknown(bytes: Data) throws {
    encoder.appendUnknown(data: bytes)
  }


      encoder.putVarInt(value: Int64(WireFormat.MessageSet.Tags.message.rawValue))

      // Use a normal BinaryEncodingVisitor so any message fields end up in the
      // normal wire format (instead of MessageSet format).
      let length = try value.serializedDataSize()
      encoder.putVarInt(value: length)
      // Create the sub encoder after writing the length.
      var subVisitor = BinaryEncodingVisitor(encoder: encoder)
      try value.traverse(visitor: &subVisitor)
      encoder = subVisitor.encoder

      encoder.putVarInt(value: Int64(WireFormat.MessageSet.Tags.itemEnd.rawValue))
    }
