[lit] Avoid use of iterator .next() method.