Scroll to make the cursor visible, guarding against cursor/document desync.
Textual's WrappedDocument.location_to_offset has an off-by-one in its
line-index clamp (len(...) instead of len(...) - 1). When a reactive
watcher (e.g. _watch_show_vertical_scrollbar) fires between a document
replacement and cursor update, the stale cursor location triggers a
ValueError. Guard here since scroll_cursor_visible is the sole
caller of _recompute_cursor_offset.