Update unit tests
Fix memory issues for bad definitions in bags

Previously things were getting double freed when there were no embedded
message definitions in the bag.  Similarly, memory was getting lost when
there were multiple messages in the bag.

Fixes #6