diff --git a/compiler/vmdef.lisp b/compiler/vmdef.lisp
index 7406d6257c5d281a343d19d78dfd880d1ba6aa96..77901f2119c520e263092940dffe55eb5e06fbe6 100644
--- a/compiler/vmdef.lisp
+++ b/compiler/vmdef.lisp
@@ -1532,7 +1532,11 @@
 	   (type (or operand-parse null) more-op) (string what))
   (unless (eq types :unspecified)
     (let ((num (+ (length ops) (if more-op 1 0))))
-      (unless (= (length types) num)
+      (unless (= (count-if-not #'(lambda (x)
+				   (and (consp x)
+					(eq (car x) :constant)))
+			       types)
+		 num)
 	(error "Expected ~D ~A type~P: ~S." num what types num)))
     (when more-op
       (let ((mtype (car (last types))))