Merge redundant tasks