Serialization test for #631