Fix tab index when closing tab from the tabs menu