Redmine#5358: minor adjustment to set_line_based
Merge pull request #185 from tzz/redmine-5358-no-duplicates

Redmine#5358: minor adjustment to set_line_based