Minimal fix for the bug. Maybe the real bug is in Tcl_ObjGetVar2(), but at least this change fixes the crash.