Channel named "REF" gets special treatment. Why?

Iam a bit puzzled to observe following behavior:
(Do not get confused by the error message, the montage obviously provides postions for channel “REF”)

import mne
import numpy as np
info = mne.create_info(["REF"], 300, ch_types="eeg")
dig_montage = mne.channels.make_dig_montage(ch_pos={"REF": np.zeros(3),})
info.set_montage(dig_montage)

ValueError: DigMontage is only a subset of info. There is 1 channel position not present in the DigMontage. The channel missing from the montage is:
['REF'].

I guess there is some motivation behind hiding away a reference channel from the mne.Info object. Can someone point me in a direction to read up on or is this a bug?

I can reproduce this, and it does seem to be about REF in particular, as REF1 for example works. and just produces:

RuntimeWarning: Fiducial point nasion not found, assuming identity unknown to head transformation

I think the error message should catch REF and then be more informative.

Thanks @sappelhoff for the quick confirmation. I do also have a more full blown example:

import mne
import numpy as np

ssvep_folder = mne.datasets.ssvep.data_path()
ssvep_data_raw_path = (
    ssvep_folder / "sub-02" / "ses-01" / "eeg" / "sub-02_ses-01_task-ssvep_eeg.vhdr"
)
ssvep_raw = mne.io.read_raw_brainvision(ssvep_data_raw_path, verbose=False)

ssvep_raw.load_data()
mne.add_reference_channels(ssvep_raw, "REF", copy=False)

dig_montage = mne.channels.make_dig_montage(ch_pos={k: np.zeros(3) for k in ssvep_raw.ch_names})
ssvep_raw.set_montage(dig_montage)

So far I did not find anything indicative.

For read_raw_brainvision there is a case sensitive match for “Ref” done here

but this seems to be about extracting the corresponding reference channel from the vhdr header file


[Channel Infos]
; Each entry: Ch< Channel number>=< Name>,< Reference channel name>,
; <Resolution in “Unit”>,< Unit>, Future extensions..
; Fields are delimited by commas, some fields might be omitted (empty).
; Commas in channel names are coded as “\1”.
Ch1=Fp1, ,0.0406901,µV

So far I do not see this of being responsible.