+ // If there had to be a change, check if ID unicity is still guaranteed.
+ // This avoids having a clash if satisfying XML requirements for ID makes two IDs identical, like "a:b" and "a!b",
+ // as both of them would be transformed as "a.b". With this procedure, one will become "a.b" and the other "a.b-1".
+ if (mangle && mangledNames.find(content) != mangledNames.end()) {