There is another issue if you are using the ATS. In some contexts pages are run in the template namespace and a proc will be defined in that space and hang around in the thread. I read in some of the docs for the ATS that defining procs in .tcl pages was not reccommended.