Given a module foo and a module foo/bar, the previous code might incorrectly treat "bar" as a file within "foo" rather than as a module directory in its own right.
CredentialsForHost