Fix off-by-one error in log handling of blank lines

This was a fun chase!  @benallard this should fix TRAC-3101.