[2.2][Console] Fix autocompletion of command names when namespaces conflict

Fixes #7234

Currently autocompletion of namespaces works on *all* namespaces at once. This fixes it to only search inside subnamespaces once we matched the first level namespace. Otherwise if you have `api:doc` and `generate:doctrine:entity` commands, typing `gen:doc:entity` trips it up because it thinks "doc" is "api:doc", and you end up with a completed name of `generate:doc:entity` which does not match any command.