Fix for enum serialization when enums where anonymous innerclasses (impl...

Fixes #1283 
De-Serialization of enums with anonymous innerclasses broken. (e.g. implementing abstract logic in enum base class)