Fix error message when fetching help for nested commands

Fixes #1017