**Apache Airflow version**: 2.0.0

**Environment**:

- **Cloud provider or hardware configuration**: Docker container
- **OS** (e.g. from /etc/os-release): Debian Stretch

**What happened**:

When working on some custom DAG override logic, I noticed that invoking `DAG.partial_subset` does not properly update the corresponding `_task_group.used_group_ids` on the returned subset DAG, such that adding back a task which was excluded during the `partial_subset` operation fails.

**What you expected to happen**:

Tasks that had already been added to the original DAG can be added again to the subset DAG returned by `DAG.partial_subset`

**How to reproduce it**:
Create any DAG with a single task called, e.g. `my-task`, then invoke `dag.partial_subset(['not-my-task'], False, False)`

Note that the returned subset DAG's `_task_group.used_group_ids` still contains `my-task` even though it was not included in the subset DAG itself

**Anything else we need to know**:

I was able to work around this by adding logic to update the new partial subset DAG's `_task_group.used_group_ids` manually, but this should really be done as part of the `DAG.partial_subset` logic
airflow/models/dag.py
return query.first()
@functools.total_ordering
class DAG(LoggingMixin):
    """
    A dag (directed acyclic graph) is a collection of tasks with directional
    dependencies. A dag also has a schedule, a start date and an end date
    (optional). For each schedule, (say daily or hourly), the DAG needs to run
    each individual tasks as their dependencies are met. Certain tasks have
    the property of depending on their own past, meaning that they can't run
    until their previous schedule (and upstream tasks) are completed.
    DAGs essentially act as namespaces for tasks. A task_id can only be
    added once to a DAG.
    :param dag_id: The id of the DAG; must consist exclusively of alphanumeric
        characters, dashes, dots and underscores (all ASCII)
    :type dag_id: str
    :param description: The description for the DAG to e.g. be shown on the webserver
    :type description: str
    :param schedule_interval: Defines how often that DAG runs, this
        timedelta object gets added to your latest task instance's
        execution_date to figure out the next schedule
    :type schedule_interval: datetime.timedelta or
        dateutil.relativedelta.relativedelta or str that acts as a cron
        expression
    :param start_date: The timestamp from which the scheduler will
        attempt to backfill
    :type start_date: datetime.datetime
    :param end_date: A date beyond which your DAG won't run, leave to None
        for open ended scheduling
    :type end_date: datetime.datetime
    :param template_searchpath: This list of folders (non relative)