Improve handling of virtual calls, kludge around broken destructor behavior.