Fix the syntax layer panic (#62366)

While working on the project search on type PR and testing it, uncovered
this bug and split off into a separate commit

Release Notes:

- N/A
c65e08a83dKirill Bulatov committed on 8/10/2026, 4:58:49 PM· committed by GitHubparent069449a
2 files changedLine totals unavailable