Hello Peter,
It seems that transaction was a misguided attempt (apparently I believed postgres supported nested transactions at the time) to prevent the failure to insert from abandoning the transaction. I think the cleanest solution at this point is to add a variant, save-dao/transaction, that uses a savepoint, and declare the regular save-dao to only be safe outside of transactions.
I've pushed this change to the repository.
Best, Marijn