Fix small-circle clipping of lines.

This corrects the handling of lines that are long enough to have two
visible or invisible endpoints, but still cross the small circle and
thus have an invisible or visible intermediate segment.

Fixes #1127.