See original proposal in this comment
But instead lock / unlock perhaps better to use save / restore names
// save prev flow
const currFlow = this.currentFlow;
currFlow.save();
// Fork and implicitly set this.currentFlow to this fork
var trueBranchFlow = currFlow.toBranch(prevFlow, condExpr, ConditionKind.True);
// do some work with `someFlow`
currFlow.restore(); // release trueBranchFlow's locals and restore previous flow