Fix issue #8: add reference handling to EnumMapSerializer.