docs: private static List<ModuleRef> findModuleRefsFromCallstack(final Class<?>[] callStack, final ScanSpec scanSpec,
              final LogNode log) {
          final LinkedHashSet<Object> layers = new LinkedHashSet<>();
          if (callStack != null) {
              for (final Class<?> stackFrameClass : callStack) {
                  final Object /* Module */ module = ReflectionUtils.invokeMethod(stackFrameClass, "getModule",
                          /* throwException = */ false);
                  if (module != null) {
                      final Object /* ModuleLayer */ layer = ReflectionUtils.invokeMethod(module, "getLayer",
                              /* throwException = */ true);
                      // getLayer() returns null for unnamed modules -- have to get their classes from java.class.path 
                      if (layer != null) {
                          layers.add(layer);
                      }
                  }
              }
          }
          // Add system modules from boot layer, if they weren't already found in stacktrace
          Class<?> moduleLayerClass = null;
          try {
              moduleLayerClass = Class.forName("java.lang.ModuleLayer");
          } catch (ClassNotFoundException | LinkageError e) {
              // Ignored
          }
          if (moduleLayerClass != null) {
              final Object /* ModuleLayer */ bootLayer = ReflectionUtils.invokeStaticMethod(moduleLayerClass, "boot",
                      /* throwException = */ false);
              if (bootLayer != null) {
                  layers.add(bootLayer);
              }
          }
          return findModuleRefs(layers, scanSpec, log);
      }