Fix removing variants from product model

Fixes issue #2162

This is needed for when you remove a variant with
`Product::removeVariant` and then flush the changes.