[Console] fixed regression when calling a command foo:bar if there is another one like foo:bar:baz (closes #8245)