Apparently, it can happen that a value that clearly is present in the SimulationResult can not be retrieved, if it is a custom type. I assume the JVM sees those types as different if loaded by different classloaders and refuses the cast.
I don't think there is any workaround for this (except insisting custom types can be serialised), but it would probably be a good idea to document this behaviour somewhere.