Only walk the name hierarchy when fromlist is None

When a fromlist is provided, the base import function already returns the last
(most specific) module in the import name hierarchy.

Closes #16