This reverts commit 50832b68. Fix clearing the TLS on detach. Change-Id: I75ed5ccccb4f31800e5f893055e96067a9695258