Correctly rescue from invalid marshal format when decoding a document