Opaque types are gathered and visited separately. As with local types,
only serialize them if they are not within a skipped function body.
Fixes a crash caused when compiling the primary file, where delayed
parsing is explictly disabled.
Resolves rdar://73167790