Calling `setApp` after the menu has been destroyed results in error. Moving the method before `super.destroy()` fixes the issue. Part-of: <!2998> (cherry picked from commit 6615d699)