Double check whether a task is misplaced
Double check whether a task is misplaced

The previous code would recognize tasks in state done or failed as
running on the wrong agent.

pyfarm/pyfarm-master,pyfarm/pyfarm-master,pyfarm/pyfarm-master