In a major setback for the cities and counties that have taken on the fossil fuel industry