Menu: preventing elements from overlapping the menu, fixes #2268.