Fix canonicalization of >2 loops with the same counter
Previously, when there were more than two loops with the same counter, e.g.
for (int i = 0; false; );
for (int i = 0; false; );
for (int i = 0; false; );
the canonicalization would only duplicate the counter once, resulting in
for (int i__0 = 0; false; );
for (int i__0 = 0; false; );
for (int i = 0; false; );
This MR fixes the issue, so that all symbols are unique:
for (int i__1 = 0; false; );
for (int i__0 = 0; false; );
for (int i = 0; false; );