Eliminate dependency versions that are known to not match the root package. See #405.

This change eliminates all dependency versions that are known to violate the dependency specification of the root package or of uniquely defined dependencies thereof. This can greatly reduce the search space for valid combinations later on in the algorithm.