Fix incorrect handling of a StringRef