fix nested messages bug in protobuf parser
The following protobuf with nested message definitions wrongly throws an error: