handle variations when generating a tree of longnames