Fixed bug related to accessing __input_namespaces property in to_xml and to_xml_file