Workaround lost XML attributes on the top element