librustc: When checking static method calls to unboxed closures, look at

the right trait and take the method name into account.

Closes #16599.

r? @huonw