Fix case where stdlib is shadowed

While it might not be a good idea, the code presented in the testcase
does obviously not refer to the stdlib http module, but gets detected as
as stdlib import. This commit prioritizes relative imports over stdlib
ones, as Python's import system does.