Fix up visibility and merging of traits.