Fixed #1666 - check from last end of line.