diff --git a/templates/bef-links.html.twig b/templates/bef-links.html.twig
index 579b13520ca2cd5a72f90cace2bc11c683073657..8a3d2cc936c854291e94bb4b4ae9e97a8714930d 100644
--- a/templates/bef-links.html.twig
+++ b/templates/bef-links.html.twig
@@ -12,10 +12,7 @@
   {% set current_nesting_level = 0 %}
   {% for child in children %}
     {% set item = attribute(element, child) %}
-    {% if child in selected %}
-      {% set new_nesting_level = attribute(depth, child) ?? 0 %}
-    {% endif %}
-    {% set new_nesting_level = attribute(depth, child) ?? 0%}
+    {% set new_nesting_level = attribute(depth, child) ?? 0 %}
     {% include '@better_exposed_filters/bef-nested-elements.html.twig' %}
     {% set current_nesting_level = new_nesting_level %}
   {% endfor %}