rcu: fix spurious thread unregister