For instance, you said you swtiched your registration to Dem. At this point you may not vote in either party's September primary, even if you were to switch back.
If you vote as a Dem. in November, you will be eligible to vote in the Dem presidential primary. If you were to switch back to Republican immediately after, you still could not vote in their primary in September for local candidates. (This law is null for first time voters and people who have moved to a new precinct and changed parties at that time. They must meet the 30 day requirement only).
I think N.Y. is the only state that has this law. It was enacted to make just this type of crossover voting difficult. Most states say a voter has to register 30-60 days prior to the primary..