Before we explicitly set the parent to null, which caused classes to fail to load on Java 9. Fixes #346.