sorry for the html mail, but i gave a chance for sane formatting of the trace output, and coloring also helps.
> What dose make-method-lambda return for the lambda expression in
> your specific case?
it was the right question, because to answer you i started to dig
deeper and found the bug. it's an incorrect assumption that the whole
make-method-lambda stuff only gets called from defmethod expansions,
and it's never nested.

MAKE-METHOD-LAMBDA-INTERNAL has this form to get the
SPECIALIZED-LAMBDA-LIST:

(or *method-lambda-list*
    (ecase (car method-lambda)
      (lambda (second method-lambda))
      (named-lambda (third method-lambda))))

this is the toplevel form that triggers the whole issue:

(def method iterate-possible-authentication-instruments ((application wiki-application) identifier visitor)
  (bind ((users (select-similar-instances wiki-user :user-name identifier)))
    (dolist (user users)
      (foreach visitor (authentication-instruments-of user)))))

so, this is a DEFMETHOD whose compilation somehow triggers the nested
compilation of AUTHENTICATION-INSTRUMENTS-OF* as seen in the trace:


  0: (SB-PCL::MAKE-METHOD-LAMBDA-INTERNAL #<COMMON-LISP:STANDARD-GENERIC-FUNCTION ITERATE-POSSIBLE-AUTHENTICATION-INSTRUMENTS (0)>
                                          #<STANDARD-METHOD #<STANDARD-METHOD {1000D22793}> {1000D22793}>
                                          (LAMBDA (APPLICATION IDENTIFIER VISITOR)
                                            (BIND ((USERS (SELECT-SIMILAR-INSTANCES WIKI-USER :USER-NAME IDENTIFIER)))
                                              (DOLIST (USER USERS)
                                                (FOREACH VISITOR (AUTHENTICATION-INSTRUMENTS-OF USER)))))
                                          #S(SB-KERNEL:LEXENV
                                             :FUNS NIL
                                             :VARS NIL
                                             :BLOCKS NIL
                                             :TAGS NIL
                                             :TYPE-RESTRICTIONS NIL
                                             :LAMBDA NIL
                                             :CLEANUP NIL
                                             :HANDLED-CONDITIONS NIL
                                             :DISABLED-PACKAGE-LOCKS NIL
                                             :%POLICY ((COMPILATION-SPEED . 1) (DEBUG . 1) (SB-EXT:INHIBIT-WARNINGS . 1) (SAFETY . 1) (SPACE . 1) (SPEED . 0))
                                             :USER-DATA NIL))
    1: (SB-PCL::PARSE-SPECIALIZED-LAMBDA-LIST ((APPLICATION WIKI-APPLICATION) IDENTIFIER VISITOR))
    1: SB-PCL::PARSE-SPECIALIZED-LAMBDA-LIST returned
         (APPLICATION IDENTIFIER VISITOR)
         (APPLICATION IDENTIFIER VISITOR)
         (WIKI-APPLICATION T T)
         (APPLICATION IDENTIFIER VISITOR)

    [... deleted here some other similar entires here that probably doesn't actually get compiled and doesn't trigger a warning ...]

    1: (SB-PCL::MAKE-METHOD-LAMBDA-INTERNAL #<COMMON-LISP:STANDARD-GENERIC-FUNCTION AUTHENTICATED-SESSIONS-OF* (3)>
                                            #<STANDARD-METHOD #<STANDARD-METHOD {1000D22793}> {1000D22793}>
                                            (LAMBDA (HU.DWIM.PEREC::INSTANCE)
                                              (WITH-LAZY-SLOT-VALUE-COLLECTIONS
                                                (SLOT-VALUE-USING-CLASS #<ENTITY WIKI-USER> HU.DWIM.PEREC::INSTANCE
                                                                        #<HU.DWIM.META-MODEL::EFFECTIVE-BINARY-ASSOCIATION-END+PERSISTENT-ASSOCIATION-END-EFFECTIVE-SLOT-DEFINITION
                                                                          AUTHENTICATED-SESSIONS {1008E4A7F3}>)))
                                            NIL)
      2: (SB-PCL::PARSE-SPECIALIZED-LAMBDA-LIST ((APPLICATION WIKI-APPLICATION) IDENTIFIER VISITOR))
      2: SB-PCL::PARSE-SPECIALIZED-LAMBDA-LIST returned
           (APPLICATION IDENTIFIER VISITOR)
           (APPLICATION IDENTIFIER VISITOR)
           (WIKI-APPLICATION T T)
           (APPLICATION IDENTIFIER VISITOR)
    1: SB-PCL::MAKE-METHOD-LAMBDA-INTERNAL returned
         (LAMBDA (SB-PCL::.METHOD-ARGS. SB-PCL::.NEXT-METHODS.)
           (SB-PCL::SIMPLE-LEXICAL-METHOD-FUNCTIONS ((APPLICATION IDENTIFIER VISITOR) SB-PCL::.METHOD-ARGS. SB-PCL::.NEXT-METHODS. :CALL-NEXT-METHOD-P NIL
                                                     :NEXT-METHOD-P-P NIL :SETQ-P NIL :PARAMETERS-SETQD NIL :METHOD-CELL (#:METHOD-CELL) :CLOSUREP NIL :APPLYP
                                                     NIL)
             (DECLARE (IGNORABLE APPLICATION IDENTIFIER VISITOR))
             (DECLARE (SB-PCL::%CLASS APPLICATION WIKI-APPLICATION)
                      (IGNORABLE)
                      (TYPE T IDENTIFIER)
                      (TYPE T VISITOR))
             (LOCALLY
              (DECLARE (SB-EXT:DISABLE-PACKAGE-LOCKS SB-PCL::%PARAMETER-BINDING-MODIFIED))
              (SYMBOL-MACROLET ((SB-PCL::%PARAMETER-BINDING-MODIFIED (QUOTE)))
                (DECLARE (SB-EXT:ENABLE-PACKAGE-LOCKS SB-PCL::%PARAMETER-BINDING-MODIFIED))
                (BLOCK ITERATE-POSSIBLE-AUTHENTICATION-INSTRUMENTS
                  (WITH-LAZY-SLOT-VALUE-COLLECTIONS
                    (SLOT-VALUE-USING-CLASS #<ENTITY WIKI-USER> HU.DWIM.PEREC::INSTANCE
                                            #<HU.DWIM.META-MODEL::EFFECTIVE-BINARY-ASSOCIATION-END+PERSISTENT-ASSOCIATION-END-EFFECTIVE-SLOT-DEFINITION
                                              AUTHENTICATED-SESSIONS {1008E4A7F3}>)))))))
         (SB-PCL::SIMPLE-NEXT-METHOD-CALL T)
  0: SB-PCL::MAKE-METHOD-LAMBDA-INTERNAL returned
       (LAMBDA (SB-PCL::.METHOD-ARGS. SB-PCL::.NEXT-METHODS.)
         (SB-PCL::SIMPLE-LEXICAL-METHOD-FUNCTIONS ((APPLICATION IDENTIFIER VISITOR) SB-PCL::.METHOD-ARGS. SB-PCL::.NEXT-METHODS. :CALL-NEXT-METHOD-P NIL
                                                   :NEXT-METHOD-P-P NIL :SETQ-P NIL :PARAMETERS-SETQD NIL :METHOD-CELL (#:METHOD-CELL) :CLOSUREP NIL :APPLYP
                                                   NIL)
           (DECLARE (IGNORABLE APPLICATION IDENTIFIER VISITOR))
           (DECLARE (SB-PCL::%CLASS APPLICATION WIKI-APPLICATION)
                    (IGNORABLE)
                    (TYPE T IDENTIFIER)
                    (TYPE T VISITOR))
           (LOCALLY
            (DECLARE (SB-EXT:DISABLE-PACKAGE-LOCKS SB-PCL::%PARAMETER-BINDING-MODIFIED))
            (SYMBOL-MACROLET ((SB-PCL::%PARAMETER-BINDING-MODIFIED (QUOTE)))
              (DECLARE (SB-EXT:ENABLE-PACKAGE-LOCKS SB-PCL::%PARAMETER-BINDING-MODIFIED))
              (BLOCK ITERATE-POSSIBLE-AUTHENTICATION-INSTRUMENTS
                (BIND ((USERS (SELECT-SIMILAR-INSTANCES WIKI-USER :USER-NAME IDENTIFIER)))
                  (DOLIST (USER USERS)
                    (FOREACH VISITOR (AUTHENTICATION-INSTRUMENTS-OF USER)))))))))
       (SB-PCL::SIMPLE-NEXT-METHOD-CALL T)


notice that the labda-list of the toplevel ITERATE-POSSIBLE-AUTHENTICATION-INSTRUMENTS defmethod has leaked into the nested compilation of AUTHENTICATED-SESSIONS-OF* due to the fragile special-var wizardry!
i briefly looked into a fix, but it seems too intertwined. maybe
someone already has enough bird's eye view knowledge around defmethod
compilation to fix it with less effort, so i'll wait a bit for the open
source fairies for now... :)

any ideas for a quick fix? or shall i record it as a LP bug?
-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“A man of humanity is one who, in seeking to establish himself, finds a foothold for others and who, in desiring attaining himself, helps others to attain.”
	— Confucius (551–479 BC)