Fix crash on threads being reaped before they are created