Prevents scheduling complete tasks multiple times

This prevents scheduling complete tasks once for each task that depends on them. The add function keeps track of which tasks have been added rather than just checking against the ones that needed to be scheduled. This can save a lot of time during scheduling when many tasks share common dependencies that are already done.