Fix _getTransitiveClosure: there was maximum one parent class in the list

But if you have more than one parent class on top, with this fix all of
them are now in the list.