make the_free_vars_compset a function

in general, compset-producing values should generate a fresh value
whenever they are used, because compsets are stateful (we don't want the
global the_free_vars_compset to be messed up by some local
modifications)