Updating shipment with packages data causes it to be corrupted

If I create a shipping label for an order and save it, the packages data is serialized into the database. If I cause the order to be saved again (for example, but emailing the customer with the tracking information), the already-serialized packages data is again serialized, and now stored doubly-serialized in the database. When loading this data with a single unserialize, a serialized string is returned instead of the expected array.