Menu: Improved support for nested menu items (#5029)