Fix gutil.PluginError + slightly improved tests