'Implements precedence for overlaid namespaces.
Loop checks each namespace in self.repos for packages, and
also handles loading empty containing namespaces.'

def find_module(self, fullname, path=None):

    (namespace, dot, module_name) = fullname.rpartition('.')
    for repo in self.repos:
        if (namespace == repo.full_namespace):
            if repo.real_name(module_name):
                return repo
        elif (fullname == repo.full_namespace):
            return repo
    if self.by_namespace.is_prefix(fullname):
        return self
    return None
