Fixed scanning bug identified in comments in pull request #1119.

NFA calculations now generate better line segments.
Edit: linking to original LSD PR #1119