Store distance along with task

This allows us to abort processing duplicate tasks early.