See this BIP. I'm not sure if this is a bug or what, but it would be good if messages always had a fixed number of fields per protocol version. https://en.bitcoin.it/wiki/BIP_0060#Code_Updates This BIP details everything that needs to be done and proposes a protocol upgrade.