Layers changes on saving to SVG.
Hi everyone!
I am using SVG's for configure avatars on a website. The ID's of the layer are used to change properties like fill, stroke or display, so the ID's must be well defined.
I have a problem with the last model. When I export it to SVG, some paths are converted to a layer with the path inside. The layer has the ID instead the path:
Original Illustrator file (.ai):

SVG exported opened with Illustrator:

SVG exported opened with notepad++:

SVG corrected manually (editing the code):

Why is this happening? How can I fix it without doing it manually? (There are hundreds of layer's names to change).
Thank you!
Downloadable files:
https://drive.google.com/open?id=1ztkXVjbqvQmh77dLTAQM7NGwPfUHsUJd

