package.loader: Fix edge case when some listing returns no content somehow
Also align that behavior for directories.
See [1] for an error instance.
Test Plan
tox
Migrated from D2577 (view on Phabricator)
Also align that behavior for directories.
See [1] for an error instance.
tox
Migrated from D2577 (view on Phabricator)