CDS/AppCDS does not support archiving classes from directory. At dump time, non-empty directory in -Xbootclasspath/a path and -cp path is being detected and reported as a fatal error. However, it seems non-empty directory in module path is not reported at dump time.
Module classes in directory from --module-path are loaded at dump time, however the shared path index for those classes are not set correctly. The index values are -1 for those classes. As a result, theose archived classes cannot be used at runtime.