Fix logic which was omitting some map line segments [1743]
Merge remote-tracking branch 'upstream/master'