Fix a bug with caching the serialized size of a Message.

@jlabanca