Fix representation and parsing of polymorphic variants

Fixes #55