minor nit: combine this and the previous comment above uniqueDirective

// Add existing import, export, and part directives, but filter imports already generated above.