I believe that's more of a trademark issues. To have a trade mark registered, you have to prove that you did your due dilligence before registering it.
If I started a company less than a year after google and called it google search as well, and i was the first to file a trademark, it wouldn't matter. If google can prove that they had a presence before you were established then they would have the rights to the trademark.
Also, once you have a trademark, you have to actively protect it. For example, lets say I started fish dog head brewery and registered a trademark, then a year or two later someone started dog fish head brewery, that's pretty damn close, so in order to keep my trademark, I'd have to send a cease and disist, then if that didn't work move on to more drastic action.
Of course, don't take me for my word. I'm a kid and only have an understanding of this because of some issues I've run in to in the past. I am not a lawyer, and maybe someone can point out the flaws.