**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
schedulable_tis: List[TI] = []
        changed_tis = False
        tis = list(self.get_task_instances(session=session, state=State.task_states + (State.SHUTDOWN,)))
        self.log.debug("number of tis tasks for %s: %s task(s)", self, len(tis))
        for ti in tis:
            ti.task = self.get_dag().get_task(ti.task_id)
        unfinished_tasks = [t for t in tis if t.state in State.unfinished]
        finished_tasks = [t for t in tis if t.state in State.finished]
        if unfinished_tasks:
            scheduleable_tasks = [ut for ut in unfinished_tasks if ut.state in SCHEDULEABLE_STATES]
            self.log.debug("number of scheduleable tasks for %s: %s task(s)", self, len(scheduleable_tasks))
            schedulable_tis, changed_tis = self._get_ready_tis(scheduleable_tasks, finished_tasks, session)
        return TISchedulingDecision(
            tis=tis,
            schedulable_tis=schedulable_tis,
            changed_tis=changed_tis,
            unfinished_tasks=unfinished_tasks,
            finished_tasks=finished_tasks,
        )
    def _get_ready_tis(