A judge found the government failed to meet its obligation to consult with Indigenous peoples about the move.