why this loop and condition? when I follow the code flow, the loop will always call `i.setAttribute("Name", "Grids")` and then `i.setAttribute("Name", "Polys")` so `Name` will always be set to `Poly` ? In that case, something is wrong here.