Issue#45

If a transaction is failed at some point, query worker tries to rollback it. 

Pull request contains regression test for the problem.