Issue #1007830 by Damien Tournoud et al: Fixed Nested transactions throw exceptions when they got out of scope.