fix crash from ghostedge in X11
--when unloading a layout under X11 when MultipleLayouts are used sometimes a crash was occuring.