Fix menus after closing a detaching tab
Patch by ahmadsamir
BUG: 348478 Differential Revision: https://phabricator.kde.org/D9448