Added with-transaction around a for-each-row