protobuf clone with #498 fix