It seems to me that the 'y-or-n-p' call gives the opportunity of a time window for the dired buffer to be reverted. But then, when this revert happen the file "foo" has already disappeared so it cannot be found and the point ends up at the BOB. I don't know how to prevent this yet. -- Manuel Giraud