Index: /trunk/source/compiler/nx1.lisp
===================================================================
--- /trunk/source/compiler/nx1.lisp	(revision 15281)
+++ /trunk/source/compiler/nx1.lisp	(revision 15282)
@@ -1427,4 +1427,9 @@
 	     (while (setq fn (assq arg *nx-synonyms*))
 	       (setq arg (%cdr fn)))
+             (let* ((env *nx-lexical-environment*))
+               	(unless (or (nx1-find-call-def arg env)
+		    (find-ftype-decl arg env)
+		    (eq arg *nx-global-function-name*))
+                  (nx1-whine :undefined-function arg)))
 	     (nx1-form context `(%function ',arg)))))
 	((setf-function-name-p arg)
@@ -1475,10 +1480,5 @@
              (setq symbol (cadr sym))
              (symbolp symbol))
-      (let ((env *nx-lexical-environment*))
-	(unless (or (nx1-find-call-def symbol env)
-		    (find-ftype-decl symbol env)
-		    (eq symbol *nx-global-function-name*))
-	  (nx1-whine :undefined-function symbol))
-        (make-acode (%nx1-default-operator) symbol))
+      (make-acode (%nx1-default-operator) symbol)
       (make-acode (%nx1-operator call) (nx1-immediate context '%function) (list nil (list sym))))))
 
