Fix segfault when displaying the plugin dialog

This partially revert changes from
426841b445f8f62191f2b0569088e0da15c42068

https://bugzilla.gnome.org/show_bug.cgi?id=728376