Menu control array indices must be in ascending order

An index assigned to an item in a menu control array is out of order with the other items.  The indices of a menu control array do not have to be contiguous (e.g.,  they could be 1, 3, and 5), but they must be in ascending order according to their location on the menu.  Get the next available index number before assigning a number to the index.