Fix withDynTransaction.

Run the block in a dynamic session with a transaction, don't try to wrap
a session function for the block in a transaction (which will fail) and
then run it.
Merge pull request #571 from slick/tmp/fix-dyn-transaction

Fix withDynTransaction.