Don't display multiply-defined commands multiple times

When adding the feature to support reopening commands to add subcommands,
I didn't notice that the parent command was getting added to the help
output multiple times. Added a test case and fixed it.