diff --git a/compiler/ir1util.lisp b/compiler/ir1util.lisp
index 3aa60aa90d8c6a2e53c0bed117eebf330aabf6f9..cecdd249feb69867b4eeb7b15779ff0d9d669c47 100644
--- a/compiler/ir1util.lisp
+++ b/compiler/ir1util.lisp
@@ -1121,7 +1121,6 @@
       (let ((form root)
 	    (current (rest rpath)))
 	(loop
-	  (when (null current) (return))
 	  (let ((head (first form)))
 	    (when (symbolp head)
 	      (let ((name (symbol-name head)))
@@ -1136,6 +1135,7 @@
 				   (car next)
 				   next))))
 		      (context (list head)))))))
+	  (when (null current) (return))
 	  (setq form (nth (pop current) form)))
 	
 	(cond ((context)