minor: revisit _possibly_invalidate_import_caches
minor: revisit _possibly_invalidate_import_caches

tomviner/pytest,The-Compiler/pytest,tomviner/pytest,alfredodeza/pytest,The-Compiler/pytest,Akasurde/pytest,markshao/pytest,RonnyPfannschmidt/pytest,nicoddemus/pytest,pytest-dev/pytest,nicoddemus/pytest