Fix usage of PushValue for recursion counters in TemplateDeclaration.
PushValue takes a new value, not a delta value. Thus something like the following does not do what you think it does: PushValue increase(myCounter, +1); This always sets the value to 1 and resets the old value at exit. To push a delta value, you need to be more verbose: PushValue increase(myCounter, myCounter + 1); This was while reviewing new code in review request 111796. Shows how much good a code review can do! I checked all other uses of PushValue and they seem to work as intended.
Showing with 2 additions and 3 deletions