Maybe fix panic (#29352)

Since around the time we shipped block diagnostics, we've been seeing an
out of range panic in the editor.

Although the code is heavily inlined, so the stacktrace is missing, this
seems like a likely place that indexing may have gone wrong.

Release Notes:

- Fixed a rare panic in the editor
6692bd9f2bConrad Irwin committed on 4/25/2025, 5:12:16 PM· committed by GitHubparentcc57bc7
1 file changedLine totals unavailable