Simplifies termination condition in insert-l function