serialization: Fix serialization of containers.