Do you have Categories and Products mixed in Categories?
Categories hold Categories or they hold Products ... they do not hold both at the same time as thing will not function correctly ...
Your Category 6 appears to hold both Products and Categories ...
Separate them properly like they should be, then test ...
Note: $current_category_id is the immediate categories_id for the Products in the products_listing ...



