The `default-buffer` is apparently not optional when the current buffer is not associated with a file. If `default-buffer` is missing and the current buffer is not a file-buffer, e.g., a note buffer, then `org-refile-get-targets` fails.