I found it a bit confusing before, that the list of windows in the
Windows menu was not separated from the list of actions of windows.
This fixes the problem.
Simply adding a separator item to the .ui files doesn't work, because
GtkUIManager removes it. The same thing happens if we add a separator
without adding a real menu item at the same time.
Thanks to John Darrington for suggesting the root of the problem.