9893: fix: Don't use uncached syntax nodes in `generate_function` for sema lookups r=Veykril a=Veykril
Fixes the crash in the comment here https://github.com/rust-analyzer/rust-analyzer/issues/9382#issuecomment-896101298
Couldn't make out a repro test for this unfortunately
still not idea about the original issue