Fixes #1597: Reorder associated transactions