When loading classes, the OpenmrsClassLoader iterates through all the ModuleClassLoaders looking for the appropriate class loader to use. To pick a class loader it compares the class name to the ModuleClassLoader package name as follows:
boolean tryToLoad = name.startsWith(classLoader.getModule().getPackageName());
The problem here is that trying to load org.openmrs.reportingui.SomeClass will match for the org.openmrs.reporting classloader. We need to append a "." to the matching to ensure this doesn't happen.