Bug 993894: the database query in bless_groups is slow