I think change loop to:
        loop
        {
            LinkThorRow(*newRows);
            if (newRows == lastNewRow)
                break;
            newRows++;
        }

.. makes it correct