fix TKEY problems

Merged Evan Hunt requested to merge 849-fix-tkey-leak-v9_11 into v9_11

Merge request reports