**Apache Airflow version**: 2.0.0, LocalExecutor

**Environment**: Docker on Win10 with WSL, official Python3.8 image

**What happened**:

When a DAG is running, and I delete task from the running DAG, the scheduler fails. When using Docker, upon automatic restart of the scheduler, the scheduler just fails again, perpetually.

![image](https://user-images.githubusercontent.com/46958547/103558919-a89f6e80-4eb5-11eb-8521-19b04ee3c690.png)

Note: I don't _know_ if the task itself was running at the time, but I would guess it was.

**What you expected to happen**:

The scheduler should understand that the task is not part of the DAG anymore and not fail.

**How to reproduce it**:

- Create a DAG with multiple tasks
- Let it run
- While running, delete one of the tasks from the source code
- See the scheduler break
airflow/models/dagrun.py
"""Generate Run ID based on Run Type and Execution Date"""
        return f"{run_type}__{execution_date.isoformat()}"
    @provide_session
    def get_task_instances(self, state=None, session=None) -> Iterable[TI]:
        """Returns the task instances for this dag run"""
        tis = session.query(TI).filter(
            TI.dag_id == self.dag_id,
            TI.execution_date == self.execution_date,
        )
        if state:
            if isinstance(state, str):
                tis = tis.filter(TI.state == state)
            else:
                
                if None in state:
                    if all(x is None for x in state):
                        tis = tis.filter(TI.state.is_(None))
                    else:
                        not_none_state = [s for s in state if s]
                        tis = tis.filter(or_(TI.state.in_(not_none_state), TI.state.is_(None)))
                else:
                    tis = tis.filter(TI.state.in_(state))
        if self.dag and self.dag.partial:
            tis = tis.filter(TI.task_id.in_(self.dag.task_ids))
        return tis.all()
    @provide_session
    def get_task_instance(self, task_id: str, session: Session = None) -> Optional[TI]: