Fix the condition of DependencyGraphIterator::hasChildren()
DependencyResolver: Add sub-class validation