Fix wrongly creating a transaction, spotted by dcousens.