Handle "cty as 'a" correctly.

Also some variables inside polymorphic variant and object.

TODO: open/closed variant ; package.