The impact of diversity on institutional longevity