Test fallback for save() for ticket_custom

Addresses #8792

When UPDATE ticket_custom fails, save() should fallback to using INSERT
An erroneously placed transaction clobbers the status of the UPDATE
Move erroenously placed transaction in SAVE

Fixes #8792