Yet another version of transaction retry...

Formal tests would be nice