Workaround QTabBar crash when removing last tab