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];
			}
		}
	}