major fix: actually get the semantics right

TVar must not be updated before the absolute final commit, otherwise
other transactions could read inconsistent state.