Issue #4589: Fix bug of argument test in MenuItems' constructors