[Julia] Fix bug with autocompletion for "nested" command, like "Base.Mai". Add test for this and also minor improvments in tests.
(cherry picked from commit 1eb460a0767370c4faa2caef2a18467d07ad725a)