Custom Class loading broken when upgrading to Platform 1.9.10

We have a class in our dss module called CompilingClassLoader that extends OpenmrsClassLoader. The purpose of this class is to compile and load logic rules on the fly. This class works just fine with Platform 1.7.x. However, when I upgrade to 1.9.10, I get the following error whenever it runs:

ERROR - ClassLoaderTask.lookForNewClasses(151) |2016-05-05 10:51:20,556| Parent must not be ModuleClassLoader
ERROR - ClassLoaderTask.lookForNewClasses(152) |2016-05-05 10:51:20,556| java.lang.IllegalArgumentException: Parent must not be ModuleClassLoader
    at org.openmrs.util.OpenmrsClassLoader.<init>(OpenmrsClassLoader.java:81)
    at org.openmrs.module.dss.CompilingClassLoader.<init>(CompilingClassLoader.java:81)

Here is the method:

private CompilingClassLoader(ClassLoader parent) {
        super(parent); //Line 81
        setupClassLoader();
    }

The above method is called like this:

CompilingClassLoader compilingClassLoader = new CompilingClassLoader(this);

Why is Platform suddenly throwing this error with the newer version?

@tmdugan we never thought of this use case. So i suggest that you create a ticket and feel free to attach a pull request. It should be as simple as removing Lines 80 - 84 from:

And removing lines 92 - 96 from: