src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts/TerminalTaskSystem/removeInstances
class TerminalTaskSystem:	private removeInstances(task: Task) {
		const recentTaskKey = task.getRecentlyUsedKey() ?? '';
		if (this.instances[recentTaskKey]) {
			this.instances[recentTaskKey].removeInstance();
			if (this.instances[recentTaskKey].instances === 0) {
				delete this.instances[recentTaskKey];
			}
		}
	}