I don't think global contexts or thread specific storage is the appropriate way to fix this. I don't fully understand why the mechglue is calling the mechanism specific routine multiple times. --Sam