FXEvaluator defined classes can't be found in current JavaFX ClassLoader

I am trying to built a site that includes a tutorial section where someone can type in some JavaFX code and execute it. I have the FXEvaluator working, but when I define a class using FXEvaluator.eval() the class is defined in a different ClassLoader and is not accessible by the JavaFX that is currently running. I can have the evaluated script return either the defined class or an instance of the class, but if that class extends CustomNode, JavaFX fails when adding it to the Stage.

Apparently, the JavaFX stylesheet support tries to lookup the class definition using Class.forName() on any Node that is added to the Stage. Class.forName() in this case fails because FXEvaluator uses a different ClassLoader. Is there any way to fix this?

com.sun.stylesheet.StylesheetException: java.lang.reflect.InvocationTargetException
at com.sun.stylesheet.types.TypeManager.getStyleable(TypeManager.java:302)
at com.sun.stylesheet.javafx.FXObjectStyleSupport.getStyleableChildren(FXObjectStyleSupport.java:247)
at com.sun.stylesheet.styleable.DefaultStyleable.getStyleableChildren(DefaultStyleable.java:172)
at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:279)
at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:257)
at javafx.scene.Scene.userInit$(Scene.fx:219)
at javafx.scene.Scene.initialize$(Scene.fx:43)
at evalproject.Main.javafx$run$(Main.fx:53)
at evalproject.Main.javafx$run$(Main.fx:53)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.sun.stylesheet.types.TypeManager.getStyleable(TypeManager.java:287)
at com.sun.stylesheet.javafx.FXObjectStyleSupport.getStyleableChildren(FXObjectStyleSupport.java:247)
at com.sun.stylesheet.styleable.DefaultStyleable.getStyleableChildren(DefaultStyleable.java:172)
at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:279)
at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:257)
at javafx.scene.Scene.userInit$(Scene.fx:219)
at javafx.scene.Scene.initialize$(Scene.fx:43)
at evalproject.Main.javafx$run$(Main.fx:53)
at evalproject.Main.javafx$run$(Main.fx:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.runtime.provider.AWT_EDT_RuntimeProvider$1.run(AWT_EDT_RuntimeProvider.java:104)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.sun.stylesheet.StylesheetException: java.lang.reflect.InvocationTargetException
at com.sun.stylesheet.types.TypeManager.getStyleSupport(TypeManager.java:348)
at com.sun.stylesheet.styleable.DefaultStyleable.getStyleSupport(DefaultStyleable.java:125)
at com.sun.stylesheet.styleable.DefaultStyleable.(DefaultStyleable.java:74)
... 25 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.sun.stylesheet.types.TypeManager.getStyleSupport(TypeManager.java:333)
... 27 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: ___FX_SCRIPT___$ParticleA
at javafx.reflect.FXLocal$Context.findClass(FXLocal.java:131)
at javafx.reflect.FXLocal$Context.findClass(FXLocal.java:110)
at com.sun.stylesheet.javafx.FXObjectStyleSupport.(FXObjectStyleSupport.java:161)
... 32 more
Caused by: java.lang.ClassNotFoundException: ___FX_SCRIPT___$ParticleA
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at javafx.reflect.FXLocal$Context.findClass(FXLocal.java:119)
... 34 more