Fix the dependency resolver to take parent classes into account, possibly wrong so I need to add more tests around it