Initially you "could" have been in trouble but once you proved what happened then everything should be passed to the dealer and I think your case would have been thrown out, these things should never happen though.
1 qusetion is did you get the car you paid for or did you get the other one?
Not hard to work out who the garage was if you bought it local
