Restrict description matches during check for managed tasks to tasks that are not completed; move managed task gathering into a separate function.