Fixed #2994 regression with the resolver

We now keep track of conflicts we have encountered
to resolve the dependencies better