fix bug in Product#save_master (see #3746)

Fixes #3746
Fixes #3801