IDEA didn't use to consider that there might be instanceof patterns in the guard expression, so it ignored this part during resolution. Now IDEA tries to resolve a reference against both the pattern variable and guarding expression.
GitOrigin-RevId: 249ce6ec8ec6db84f9a5fc4622b4433550b38bf4