Performance tweak on Iterable first/last