notes: make expand_notes_ref globally accessible