Generate a correct error message, instead of referring to a variable
that gets changed on the next line.