Merge "Fix regression when removing task." into oc-dev