Make XmlSerializer less weird with Resource