Fix potential KeyError with 'lines_added' in 55e46db.