That night with Daniel, you realized in retrospect, was a huge mistake. You had not taken into account the consequences that your flashlight usage and the sex you were having would have. Still being of a male mindset, despite having a female body, you decided, was likely the cause of that.
Your first clue that something was wrong came when you tried to use the light to change yourself back. As fun as it was being a woman, you had no intention of staying that way. Yet try as you might, the blue setting wouldn't work on any part of your body. Vainly and frantically, you remember, you had tried to do anything with that flashlight, but it had not worked.
Frantic, you went back to the mall, to the store where you had gotten the flashlight. But the store was gone, vanished into thin air. You vaguely remembered there was an instruction manual to the flashlight, and you quickly pulled the piece of paper out of your purse. You remembered the feeling of dread as you read the warnings and cautions that you had ignored before.
"WARNING: Flashlights male functionality will cease to work on any individual who is currently pregnant or who has been pregnant within the last six months."
Then it occurs to you. The flashlight changes things and the world changes with it. When you became a girl, the whole of existence changed to fit it--photographs, people's memories, your clothes, everything.
You go up to the sleeping Daniel and shine the pink light on him. You are pregnant so the light won't work on you--but the light can still work on him. If the whole of existence changes so that Daniel was always Danielle again, that should wipe the pregnancy out of history the same way any photographs of him/her in the wrong sex get wiped out.
In short order, there's a sleeping woman lying there, looking just as she did months ago. But did this get rid of your pregnancy?