Bug fix: routes that loop are now properly handled.