Fix usage of string when StringRef was needed

Also adding a variable to the test, so release bots match %1.
This should also calm the gdb buildbot.

.