modules: fix repl require calling the same file again
This makes sure multiple require calls will not fail in case a file was created after the first attempt.
Fixes: https://github.com/nodejs/node/issues/26926
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines