[ticket/12892] Do not set S_NUM_ROWS when adding a row to a template loop

We do not set S_NUM_ROWS while adding a row, to reduce the complexity
If we would set it on adding, each subsequent adding would cause
n modifications, resulting in a O(n!) complexity, rather then O(n)

PHPBB3-12892