Fix a bug where old view controllers and tab bar items were not removed properly when setting new ones.