Improve diagnostic messages for the yaml deserializer