I had the same problem when I had 1.6x and it is also in 1.7.1.2
I made a change in the code for 1.6 and 1.7 and it works well for me. All my products have the same attributes S, M, L, etc. The change will now display only the product available with the attribute selected. I did not test it with simple products. I hope the developers can fix issue, it is also shared in BOOM-2025
for 1.6 the change in file: modules/blocklayered/blocklayered.php
for 1.7 the change in file: modules/ps_facetedsearch/ps_facetedsearch.php
you will need to add the following line
JOIN `'._DB_PREFIX_.'stock_available` sa
ON (sa.`id_product_attribute`=pac.`id_product_attribute` AND sa.`quantity`>0)
so the complete line will like this:
foreach ($sub_queries as $sub_query) {
$query_filters_where .= ' AND p.id_product IN (SELECT pa.`id_product`
FROM `'._DB_PREFIX_.'product_attribute_combination` pac
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
ON (pa.`id_product_attribute` = pac.`id_product_attribute`)'.
Shop::addSqlAssociation('product_attribute', 'pa').'
JOIN `'._DB_PREFIX_.'stock_available` sa
ON (sa.`id_product_attribute`=pac.`id_product_attribute` AND sa.`quantity`>0)
WHERE '.implode(' OR ', $sub_query).') ';
}
good luck