Validate buffer_id of anchors in is_valid (#11170)

Release Notes:

- Fixes diagnostic panic better (follow up from #11066)
5674ba2a49Conrad Irwin committed on 4/29/2024, 4:24:04 PM· committed by GitHubparent95118c6
1 file changedLine totals unavailable