The Rust resolver's handler/service/struct heuristics took the first
same-named item and then checked scope; they now drop items declared inside
a function body and out-of-scope names before choosing, and take the file's
own item first.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>