Hack in a fix for the handling of var/let, probably imperfect