APPLYHOOK-ENVIRONMENTAPPLYHOOK is documented to take an optional environment argument. CLtL says "Furthermore, the env argument is used as the lexical environment for the operation; env defaults to the null environment."
However, there is no way that the lexical environment can effect the way in which APPLYHOOK processes its arguments; it merely calls the specified function, and function call is not affected by lexical environments. (The "function" argument to APPLYHOOK is a function object.)
This has been regularly a source of confusion for programmers encountering APPLYHOOK.
The comments also apply to functions bound to *APPLYHOOK*, i.e., under the description of *APPLYHOOK* on p.322, the following
"The non-NIL value of *APPLYHOOK* should be a function that takes three arguments, a function, a list of arguments and an environment..."
ENV" argument to APPLYHOOK. Specify that the non-NIL value of *APPLYHOOK* should be a function that takes two arguments, a function and a list of arguments.ENV argument from APPLYHOOK and any code that passes one to APPLYHOOK.ENV argument passed to APPLYHOOK. Fix any *APPLYHOOK* functions to only take two arguments (or to make the third argument optional.)