Refiling checks if an entry is refiled to itself. Of course, this check is irrelevant when using refile to jump to a location.
@@ -8137,7 +8137,8 @@ operation has put the subtree."
(setq file (nth 1 it)
re (nth 2 it)
pos (nth 3 it))
- (if (and (equal (buffer-file-name) file)
+ (if (and (not goto)
+ (equal (buffer-file-name) file)
(if regionp
(and (>= pos region-start)
(<= pos region-end))