Changed the FindFreeVariables visitor in specialize_branched_loops to a graph visitor. Fixed an internal test for specialize_branched_loops.