Fix for last when used on an iterator rather than a list