Hi guys,
I am not even sure I am supposed to report this anymore, but I will do it anyway in case somebody else has a similar problem as I did.
I had a situation with the above loop being used on a product detail page. Old project, long story.
For one of the products, there were no products displayed although we had products from the same manufacturer.
After investigating for a long while, I have discovered that the code used in the loop is actually a SQL query. But the SQL query did not care about the Inactive status of the products and it would select top 12 results. In my case, all first 12 results were inactive products which led to the loop not displaying anything.
I hope this saves time in the future for anybody having this issue with old projects.
Thank you,
Adrian