Nightly build TESTS failing for extensions with dependencies to other scriptable modules

In my case the extension GelDosimetryAnalysis depends on SlicerRT. The problem locally is that the SlicerRT_DIR CMake variable is not set. Instead it gives me this

CMake warning message

CMake Warning at C:/d/Slicer4/Extensions/CMake/SlicerBlockAdditionalLauncherSettings.cmake:48 (MESSAGE):
Dependent extension SlicerRT cannot be found by CMake find_package(),
therefore paths variables cannot be imported from this extension. The
problem can be resolved by generating SlicerRTConfig.cmake by adding
include(${Slicer_EXTENSION_GENERATE_CONFIG}) to the top-level
CMakeLists.txt of the dependent exension.
Call Stack (most recent call first):
C:/d/S4R/Slicer-build/UseSlicer.cmake:281 (include)
CMakeLists.txt:24 (include)

However include(${Slicer_EXTENSION_GENERATE_CONFIG}) is in the top-level CMakeLists, and SlicerRT does generate a SlicerRTConfig.cmake.

If I define SlicerRT_DIR manually, then it works nicely. It’s not done on the factory unfortunately, and this is where I am stuck now. We have a factory machine and was going to take a look at the issue on it, but I haven’t gotten to that point yet.