Tweak to omit unnecessary import and include all imports in the sort.