Another variation for (NOT (SB-C::FUNCTIONAL-HAS-EXTERNAL-REFERENCES-P SB-C::CLAMBDA))
(defun foo () ((lambda () (declare (optimize debug)) (block nil (flet ((fun () (return nil))) (declare (inline fun)) #'fun (fun))))))
Another variation for C::FUNCTIONAL- HAS-EXTERNAL- REFERENCES- P SB-C::CLAMBDA))
(NOT
(SB-
(defun foo ()
((lambda ()
(declare (optimize debug))
(block nil
(flet ((fun () (return nil)))
(declare (inline fun))
#'fun
(fun))))))