Added several internal tests to specialize_branched_loops. Fixed some bugs surfaced through testing. Most important one was dealing with complex but solvable logical expressions. Fixed handling of vector valued selects with a scalar condition as well.