Fix calculation of line numbers of errors in evaluated expressions

Broken in 3118f39.