diff --git a/compiler/entry.lisp b/compiler/entry.lisp
index 6878cd35b8a8565c20c97344daef240b7b4aa790..df938213d18aeb5faddd2e3a89eaa60910e701ad 100644
--- a/compiler/entry.lisp
+++ b/compiler/entry.lisp
@@ -90,8 +90,7 @@
 	       (new (make-functional :kind :top-level-xep
 				     :info (leaf-info lambda)
 				     :name (leaf-name ef)
-				     :fenv nil :venv nil
-				     :benv nil :tenv nil))
+				     :lexenv (make-null-environment)))
 	       (closure (environment-closure
 			 (lambda-environment (main-entry ef)))))
 	  (dolist (ref (leaf-refs lambda))