Test preventing ThreadLocal leaks