Fix for 3615411, the linesAppended optimization was old and broken, and it's easier...