Fix struct field visibility and add enum field doc

Struct fields with inherited visibility were previously stripped.

Closes #9899