Index: openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl,v diff -u -r1.78.2.23 -r1.78.2.24 --- openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 17 Nov 2016 18:23:48 -0000 1.78.2.23 +++ openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 13 Jan 2017 14:46:50 -0000 1.78.2.24 @@ -288,8 +288,13 @@ ::xotcl::Object instproc qn query_name { #set qn "dbqd.[my uplevel [list self class]]-[my uplevel [list self proc]].$query_name" - set qn "dbqd.[my uplevel {info level 0}].$query_name" - return $qn + set l [info level] + if {$l < 2} { + set prefix topLevel + } else { + set prefix [my uplevel {info level 0}] + } + return "dbqd.$prefix.$query_name" } namespace eval ::xo { Class create Timestamp