ModeManager.getModeHistory needs to include the current mode of the
Dockable. Otherwise code that relies on iterating over the history may
miss the current mode (which in a way is the most important mode of
all).