Fix race in RemoteTaskRunner that could lead to zombie tasks.