[REF] 8.0 -> 7.0 #3717 : better code for better inheritance of product_id_change

Backport of #3717 to 7.0
Thanks to @alexis-via