to_xml() version (hot)fix

Temporary, because to_xml() should not change self.version