Prefer where clauses to impls in trait resolution (not vice versa).

Prefer where clauses to impls in trait resolution (not vice versa).

Fixes #18453.

r? @aturon