                 siteroot= path.dirname(fullname)
                 siteLookupRoot ?= siteroot
                 sites[siteroot]= m
-                (xsupersites= supersites.slice(0)).push(siteroot)
                 for sitepath in m.paths
-                  loadTree(normalize(sitepath), xsupersites)
+                  loadTree(siteStack.concat([normalize(sitepath)]))
 
       visited= {}
       visited[fs.lstatSync(rootdir).ino]= true
       loadDir('', visited)
       meta= {}
-      supersites.push(rootdir)
-      for sitename in supersites
+      for sitename in siteStack
         if rawmetas[sitename]
           meta= extend(meta,rawmetas[sitename]['/'],sitename+'/')
       metacache[rootdir+'/']= meta

      else
        r= _.clone(dominant)
      if r['build_lineage_']
        (r['lineage_']= ((base['lineage_']||[])).slice(0)).push(name)
      r

    loadTree= (rootdir, supersites) ->
      myrawmetas= rawmetas[rootdir]= {}
      myattribmetas= attribmetas[rootdir]= {}
      modules= []

    dirs = baseSiteStack  # note: the stack is maintained in reverse order
    userPath= dirs[0]
    defaultPath= dirs[1]
    loadTree([defaultPath])
    rawmetas[defaultPath]['/']= extend(rawmetas[defaultPath]['/'],options,'(options)')
    loadTree([defaultPath,userPath])

  meta_lookup: meta_lookup

