Fix cyclic task dependencies.