remove unnecessary recursion in relooper RemoveUnneededFlows