Just remember that how things work online don't necessarily function the way
it does in the offline world, however much we want it to work both ways.
That's why registrars have that portion in their legal fine prints about giving
your money back in case they're not successful in getting the name...because
things like this do happen, however unintended it is. If they keep your money
yet don't give you the domain, then that's a cause to make a big fuss.
You can rant and rave all you want, even sue. But it's not going to change
the reality that someone else actually got it first.
If there's a lesson to be gained from this, it's use a registrar that does things
in real time. Of course, even that's not easy to figure out...