Keep track of inheritance info, for (and inspired by) mindoc.