Bug 968179 - Fix crasher when using grid views in dynamic panels (r=margaret)