Remove duplicate auto-imports

There is a duplicate import removal logic in ycpc, but it doesn't work
for auto-iports such as UI. As a result, we need to do the deduplication
again ourselves.