ENGINE-1378: refactoring on Tx vs NonTx Work mechanism + fixed bugs detected by tests