Fix crash when urlrewrite is configured to allow infinite rewriting
Make sure urlrewrite plugin only affects tasks it is configured in. fix #2812