Fixed infinite loop when evaluating syncmem critical path.