fix handling of enums with duplicate values
fix handling of enums with duplicate values

It is possible, in an enum, to have different names for
the same values. Unfortunately, it is rejected in a switch()/case
because the same value cannot appear twice (switch/case is
value-based).

We therefore have to add only one case: for each value, not
for each name.

doudou/modelkit-component,doudou/modelkit-component