Fix application name when printing subcommand help.

I introduced this bug in PR #5754. It's fixed against master in #5796, but that won't be backported to 2.x.