Fixed generation of nested declarations in classes.
Fixed generation of unions.