SI-8065 Regression in implicit resolution

Follow-up to https://github.com/scala/scala/pull/3408