Handle variable bindings properly in branches