this function is a potential source of buffer overruns, fix it.
maybe check parents too.
Move child relationship into the descriptor base class, parent is there but the other direction is missing