tools: more pattern fixes in detect_loops
tools: more pattern fixes in detect_loops

chuckatkins/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,sdalton1/legion,sdalton1/legion,sdalton1/legion,sdalton1/legion,chuckatkins/legion,chuckatkins/legion,chuckatkins/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,sdalton1/legion,chuckatkins/legion,chuckatkins/legion,sdalton1/legion,chuckatkins/legion