The supreme court even ruled unanimously.