If the symbol is the null string, we would read an invalid byte

When the symbol string is a null string, we would read the byte at
position -1, which is invalid for the string. So we need to check
whether last is actually a valid string offset here.