remove self-loop paths in datapath extraction