Details

If a product has no category, and the category is changed using a group operation, the product is duplicated.

It seems that the product-to-categories table contains a record for the product without category (pointing to category 0). But the OSCPMWin application expects that a product without category does not have a record there. So, it creates a new record without deleting the old one.

Pending to debug the whole behavior, trying to follow OSCommerce.
The question is if a product has no category assigned, then, doe it need a record in product-to-categories or not?

Indeed, OSCommerce inserts a record in products-to-categories pointing to category 0 when selecting the root f the category list.
Note that there is not really a product without category, only products assigned to category 0 (which is the root).