fix parsing of optional parameters.

Without this change the following (valid) protobuf snippet will not compile:

import "nanopb.proto";

// This message is used by the client to upload sample data to the server.
// It is unacknowledged to save bandwidth.
message SensorSample {
	// sampleType is usually a single character string.
	required string sensor = 1 [(nanopb).max_size = 32];
}