Fixed scanning bug identified in #1119

Fixed scanning bug identified in comments in pull request #1119. 
NFA calculations now generate better line segments.