I have extracted (most of) the commonalities already into _sync_and_start_transaction_if_needed ;-).
I don't think any more commonalities are worth the trouble so I'll leave this as is.