SONAR-926 Fix computation of number of lines when the latest line is empty