Remove unused imports in patches