Yes, the example in the issue is not caused by not existing any element for which the predicate is true, but rather for the unchecked `end`.
I would replace `var i = end` with `var i = end min self.length - 1`. I don't see any way we can avoid using `length` here because we are not only interested to know if `end` is a valid index, but also to know the last valid index if `end` is not. If the collection has infinite size, the `lastIndexWhere` method may not make sense at all.
I see that `last` already relies on length - 1. Isn't it reasonable to assume that in finite indexed sequences the length of the sequence can be computed in contant time most probably?