Fixed an issue preventing some threads from being GC'ed (by Stephen
Allen).