Proposed partial fix for issue #19820

This is a partial fix for issue #19820
Tests for #19820
Fixed #19820 -- Provide the user with more helpful error message on a deserialization error.