Merge pull request #165 from kpbarrett/devel

Fix issue where thread specific data is dereferenced inside the key value destructor