When a green thread dies quickly, it will call the linked callbacks on
the link call synchronously. In this case, an error will happen when
ThreadGroup is used, as the thread is not accounted for until the link
is done. This manages this race condition by reverting the operations to
link after.
Change-Id: Iccf6edb0dfddda54552bd8787f64da84486061b7
Closes-Bug: #1662939