Fix search for end of defun in let-extraction