Fix upvars sometimes not being marked as used mutably

Drill down the loan path for `McDeclared` references as well since it might lead to an upvar.  Closes #18769