"I wish I knew what this was ..." Sarah said, holding the stone up. Then, on the tail end of that statement, she was forced to add "... and I wish I wasn't popular." The stone had made her wish for something that was the opposite of something that she wanted. Sarah wanted to be popular (or rather stay popular), so the stone made her wish for the opposite. And since she heard the wish, her memories were intact. The stone was delighted by the idea of Sarah being treated like a loser and knowing that she used to be the most popular girl in school.
The stone glowed, granting both of her wishes.