The search was.
The lower court made its ruling over the brake light, but the higher state court and USSC made their rulings over the search. A bit of a divide here. And it gives the police a bit too much power.