fix TKEY problems

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

Merge request reports