Fix a bug when packing structures that include the packed size.

refs #1104