Do not generate a new identifier for a payment when it is re-saved

Fixes #3733