Replacing unnecessary removal of task dependency