Make ContentGroup.groupinfo_by_id more defensive