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

NFA calculations now generate better line segments.