avoid erroneous error condition on too short lines (#4838)