added the function ParseLegalAttributeEndOrDie to replace some code in FindMenuTagStartOrParseLegalOrDie and also to make searching for the menu identification attribute easier