fix for not caching @@TRANCOUNT in outside_transaction? (3.2 branch)

This change would fix the issue #303 in the 3-2-stable branch.