Do not gather mixed types that are not to be generated.

Without this check, duplicate types, such as between WebKit and WebKit.DOM will overwrite each other.
Add missing braces.