ENGINE-1890, fix bad transaction managment