Fix key removal issues in Thread Context (2.24.x
branch)
#3210
+137
−59
2.24.x
branch)
#3210