#29 Minor improvement of getting correct transaction management context