Added an additional (optional) scope argument to branches_linearly_in_var(s). This scope stores variables that have already been detected to have branches in the free variables. This is necessary for correctly handling let nodes whose values branch in the specialize_branched_loops pass.
Had to modify the visit methods for Select and IfThenElse node to visit the conditions in the cases where the nodes are not actually determined to branch in the current variable. This is so that potential modifications to the names of let variables can be injected into the conditions.
Fixed a bug in how the BranchCollector vists min/max nodes.
Fixed another bug in the how lets are visited. I needed to add the unbranched let binding as well as each of the branched variables. This is because we might run into a case where the combination of the let value branches with other branches causes, and overflow and a part of the IR is written out to the collected branches with the original let variable. All tests are passing now.