BS-11340 Factorized the Diagram menu, to know if it is the 'Diagram' or
the 'Close' menu that can't be found.