The issue of an unexpected load module being loaded seems to be related to load module search order, and, in particular, when dealing with APF authorization. Another way of asking the question is, "What would cause IBM's LOAD macro to bypass modules in the JOBLIB or STEPLIB when these are not APF-authorized in favor of the same module in a Linklisted, APF-authorized library?"
Within CA Datacom, like many products, certain functionality must be handled through APF authorized code. Consequently, we require APF authorization for the base loadlib, and since the CUSLIB, is also normally part of a JOBLIB or STEPLIB concatenation with the base loadlib, it, too, needs to be authorized. This leads to a standard disclaimer - "If one JOBLIB or STEPLIB library is APF-authorized, then all must be authorized. Libraries lose their APF authorization when they are mixed with non-authorized libraries in JOBLIB/STEPLIB."
The key here is in the above statement. Even though the desired load module is in your JOBLIB/STEPLIB, if that loadlib is not APF-Authorized, that module may not be used as expected. The 2.1 IBM z/OS MVS Programming: Assembler Services Guide, under Program Management / APF-authorized programs and libraries, says, "APF also prevents authorized programs (supervisor state, APF-authorized, PSW key 0-7, or PKM 0-7) from accessing a load module that is not in an APF-authorized library."
Therefore, even though the module is in a JOBLIB/STEPLIB loadlib, and that library should be chosen first in the search order, if the loadlib is not authorized and the calling module needs it to be, this loadlib will be skipped and the search will continue through other loadlibs or to the Linklist until an authorized version of the module is found.
The best course of action is to ensure that the load libraries are APF-authorized as directed by each product, and that recommendations from each product for using or not using Linklist are followed. For CA Datacom, we identify that the base loadlib and CUSLIB should be APF-authorized, and do not recommend the use of Linklist for these loadlibs.