fix branches :loops handling in annotate-loops