Fixing System.Xml.XPath.XDocument implementation