Uses the right task_id for unfulfilled counts in rescheduling

When rescheduling a task, we loop over all the missing dependencies and count
how many times they've each been rescheduled. Due to bit of a typo, we actually
looped over the missing dependencies and counted the dependent task each time.
This fixes that typo and counts the correct tasks.