Fix persistent vars map

The module was not clearing out the variables map between function
calls.