reapply 94dec1: Fix broken XML serialization