Fix var type inference2

Giving it another try.
goddamn it, this is the third time I've had to tell you to use the helper functions we declared for this. Please don't let there be a fourth time.