The cause of the problem is that

uplevel #0 destroy $widget

is (properly) expecting that the namespace
of level #0 is the global namespace so that
"destroy" resolves to the Tk command "::destroy".

What is happening instead is that Itk has done
some shenanigans under the covers to force the
namespace of that frame to be ::iwidgets::Panedwindow
so that some resolutions in the config script
happen as they need to.

This is clearly an incorrect solution, and another
one has to be found, probably involving the pushing
and popping of a callframe.