A scene with two lines.
Select one of them - causing the points to be turned on.
Hide the line. Zoom Extents.
The hidden line will still influence the zoomed view.
When you now select the remaining line (e.g. by Ctrl+A) and then call
Invert, the command line will echo
2 curve points added to selection.
Ceterum censeo Carthaginem esse delendam: Locking a curve with points on should turn those off…