Fixed selection when searching for noterefs