            if (!foundNode)
                previous = last;
            else if (!next)
                next = last;
            return false;
        });
        if (!next)
            next = first;