A broad ruling could dramatically change the power of states to attract investments with tax incentives.