message: Prevent an exception when closing a tab using its close button
diff: @@ -650,6 +650,8 @@ export class MainWebUi extends ThemeableElementBase implements keybindingmanager
  if (ptyId !== null) {
  WebIpc.ptyClose(ptyId);
  }
  + this._terminalPtyIdMap.delete(tabContentElement);
  + this._ptyIdTerminalMap.delete(ptyId);
  }
  if (DomUtils.toArray(tabWidget.children).filter( (kid) => kid instanceof Tab).length === 0) {
  @@ -1074,9 +1076,6 @@ export class MainWebUi extends ThemeableElementBase implements keybindingmanager
  return;
  }
  - this._terminalPtyIdMap.delete(terminal);
  - this._ptyIdTerminalMap.delete(msg.id);
  -
  this.closeTab(terminal);
  }
  