Fix namespaces attribute writing with XML utils #1728