Issue #737 (resource persistence layer raises an error when saving XML documents)