mkdb: merge multiple hierarchy boxes into one

Ideally we'd also merge the trees. Add a few todos for this.