That looks wrong - if we're serializing, then we have control over the object we write, so this should just fail.