Scrollspy: ignore invisible list items

Fixes #13071
Perhaps do this after the `href` checks, since `:visible` is expensive?