IANAL, but as far as I my very limited understanding goes. Prior art isn't verified when a patent application is applied. Only after that, when someone files a suit trying to invalidate the patent. Which is a separate case from the injunction. So Samsung would have to file a separate suit to invalidate the patents. If then win that, then and only then, they'll be able to stop the injunction by saying Apple patents are invalid. Which of course, would cost Samsung a lot of money and time.
So you can file any bogus patent, the USPTO won't verify. They'll only check if all the paperwork is in order. It will only matter if your patents are bogus if someone tries to invalidate it.
Or am I talking crap? Please correct me where I'm wrong, I'd love to learn more.