Fix flashing pipeline history for long pipelines (#246).

Please review and consider this pull request.