Fix var type inference2

Giving it another try.
I have no idea what you just explained or how it supposedly answered this question. This transformer does nothing to rewrites that aren't at the top of the rule. If that's correct, I need you to be more detailed in your explanation of why, so I can understand.