I wrote this compiler pass myself without knowning there was one in the routingbundle, so that's the reason why it looks different.

But I agree that we shouldn't use the loop, will fix it.