Importing the file with the same name leads to bad loop and consequently OOM. We should probably record the files being processed (including the main file) and error out in case of loop.