I'll add an extra check whether the Module is actually capabale of loading the class.
I'm checking if the module's classloader is already available:
protected boolean isResolved(Module m)
{
ClassLoader cl = ClassLoading.getClassLoaderForModule(m);
return cl != null;
}