'Instruct all children to perform dereferencing.'

def dereference(self):

    all = []
    indexes = {}
    for child in self.children:
        child.content(all)
    deplist = DepList()
    for x in all:
        x.qualify()
        (midx, deps) = x.dependencies()
        item = (x, tuple(deps))
        deplist.add(item)
        indexes[x] = midx
    for (x, deps) in deplist.sort():
        midx = indexes.get(x)
        if (midx is None):
            continue
        d = deps[midx]
        log.debug('(%s)    merging    %s    <==    %s', self.tns[1], Repr(x), Repr(d))
        x.merge(d)
