Fixed a bug in the handling of LetStmts by specialize_branched_loops. Was not considering the maximum branching depth value.