Union: fixed non-trivial cases of union types, including recursive types (JSONType, in readme) defined with traits.