First of all, I'm surprised that pip doesn't warn or error in this case. I think this is certainly a bug that should be fixed. The problem can come up in much more subtle cases too that are very hard for the user to understand.
The good news is that this is a known problem that happens when doing dependency resolution and has a solution. The solution, which is referred to as backtracking dependency resolution, basically boils down to saving the state of the dependency resolver whenever you have multiple choices to resolve a dependency. Then if you reach a later point where there is a conflict, you can backtrack to the point where you made a choice and see if another option would resolve the conflict.