Found the list messed up again after searching a product, which is linked to a 2nd folder. Decided to add classes to the <th> tags, so we can exclude the choosen classes:
$('table tbody td:has([href*="pID={$products_id}&"])').parent().find('th').not('.pmodel').not('.pname').addClass('pname').before('<th class="pmodel">{$products_model}</th>');
this works for me even with three links 😉