Correct. When Sawyer was down with Juliet, she said it didn't work--she was assuming this since they were still all there. Then she must have had some sort of revelation and was about to tell Sawyer something just before she died.
Then when Miles and Sawyer were burying her body, it was Miles that said Juliet is saying "It worked."
Again, we don't know
1) What "it" is.
2) What changed Juliet's mind if she is talking about the bomb.
I have a feeling that once someone dies on the Island, they come to some sort of an understanding. Perhaps the secrets of the Island are finally revealed to you, as compensation for having to suffer and die.
When we see a dead character reanimated in someone's head or on the Island, they seem to have this presence, everything is calm and clear, they seem to know exactly what they are doing and WHY they are doing it - think Charlie when he tells Hurley that (Jack/Kate) 'shouldn't be raising him', or Yemi, or Alex, etc. Now, these are most likely manifestations of MiB, but when they get reanimated, they seem to split consciousness - they maintain a certain level of their own personality, but act in the ways that their puppet master wants them to.
So, if this is indeed the case, it is very likely that the 'spirits' (for lack of a better word) that Miles talks to have this same sort of understanding. This seems to me like the most obvious way Juliet would change her mind so quickly.
3) If Miles is really telling the truth. He has a history of lying about what the dead people are saying. Although I doubt this is the case.
Miles has lied about the dead off the Island for profit, but if I remember correctly, he has been honest on the Island (excluding the omission of knowing there was something up with Claire before she wandered off).