3 months after the party, but I want to step in and say that this is *wrong*. `foreach` makes a "copy", yes, but it doeesn't save the range. If you are passing a reference range, then this will not work at all.

For it to function properly, you'd need to write it as:
```D
    foreach (_, ElementType!Range elem; range.save)
    {
        if (elem != element)
            return range;
        range.popFront();
    }
```
But if you did that, you'd need `Forward`.