Add workaround for spyder.main plugin.dockwidget.close call