when processing dependencies on deleted classes, do not affect already compiled files
import: ensure imported classes are not lost after on demand folding (IDEA-132190)
collect files under progress
simplier code, thanks to review