detect_loops updated for new event encoding
detect_loops updated for new event encoding

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