Put back egid

Putting back the egid, but at the end this time, it makes more sense if you consider the way the search controller is implemented.