I was revolting with a Duke against the King-Bishop. I realised after a little that I was independent. I then swore fealty to the King-Bishop to protect my realm, and then cleared up the crown authority war as I was now actually on the regime side.
The war hadn't ended...I only realised my independence when I realised my wars were gone from the bottom while the revolt still existed...