Preserving the good effect of 014e5ac92a on not leaving dangling local
definitions while keeping some compatibility on when to generalize
when an index also occur in a parameter (effect on PersistentUnionFind
for instance).