Redmine#5358: minor adjustment to set_line_based

Needs review and testing.