Sounds more like stupid law. For as screwy as Pennsylvania is, we had the the sense to put in certain voting laws-
1) You can only vote your party during primaries.
2) There's a cutoff limit for party changing and if you do change you're going to be stuck with it for quite awhile before you can switch back.