CRM-13426  Fatal error on search that includes a smart group created by custom group