Issue #22773: fix failing test with old readline versions due to issue #19884.

--HG--
branch : 3.4
Issue #22773: fix failing test with old readline versions due to issue #19884.
Close #22457: Honour load_tests in the start_dir of discovery.

We were not honouring load_tests in a package/__init__.py when that was the
start_dir parameter, though we do when it is a child package. The fix required
a little care since it introduces the possibility of infinite recursion.
Fix regression in issue 22457 fix.

When used in the real world it can under some situations trigger
"    assert not _relpath.startswith('..'), "Path must be within the project"
     AssertionError: Path must be within the project
"

Because _get_name_from_path was not expecting to be called with the top level
directory.