
State is accumulating unnecessarily in AST tranformation instances. We can fix the ones we have implemented so far just by using a local variable and passing it into the methods where it is used. All the methods are private so this change is safe in a point release. Fixes gh-5283