I detected that some categories on my site don't show the correct products. Instead, show ALL products assigned to the root category. I made a test adding this to my list.phtml:
And I saw it return every time 2, that is the root category, instead of the current real category. What could it be?