You are probably missing products_to_categories table entries for those products which are not appearing anywhere.
Also worth noting is that you should never mix both products and sub-categories at the same level. v1.2 didn't enforce that, but v1.3 does.



