That's OK - fixing this can be considered adding new functionality :)
Haven't looked into the error, yet, but the Tcl backtrace is a source dump. This is why the variable, rather than their values, show up.
To see the actual SQL triggering the error with values substituted for variables, go to your nsd.tcl file and for each pool set "LogSQLErrors" to "on".