Fix re-processing cross-reference when node kind changes (#17883)
This is quite a bad bug. Currently we rely on `SymbolNode` being updated
in-place for all indirect references, but this is not the case when node
kind (`FuncDef`, `Decorator`, etc.) changes, in this case a _new_
`SymbolNode` is created. I fix this by forcing reprocessing if the node
kind changes.
This currently blocks support for PEP 702, see
https://github.com/python/mypy/pull/17476, so I will not wait for long
before merging.