When the user selects a group, then right-clicks in an empty portion of the legend, the 'Remove Group', 'Zoom to Group' and 'Properties' menu items are enabled. Selecting any of these actions will result in an IndexOutOfRangeException and a crash of the application.
the exception should be caught by the menu action handlers (i.e. making the action a no-op)
these menu items should not be enabled when not clicking on a group (but the Add Group and Add Layer buttons will always be enabled).