fix for double public library

This is a patch over database inconsistency that showed up when a user added public group to library, removed public group from library, and added again. Tomorrow I'll add some defensive code to check for double existence of this group. In any case, this fix should remain, as its defensive against dupes.