Fix TransactionScope-related bug

Closed connection within an active TransactionScope wrongly got
disposed, caused hangs in some cases.

Introduced in ade62ad43e846fc15d1b5eda51460d496fd9e9b9, sorry.
Unit test which reproduces this already exists, a bigger pull request
will be submitted later.