Umm, if the variable is '%thevariable#chan', what's with the *?
Also, when you're unsetting it, you don't want to eval it. A simple:
unset $+(%, thevariable, $chan, *)
OR//
unset % $+ thevariable $+ $chan $+ *
is sufficient to unset all '%thevariable#chan<whatever>' variables.