It is correct that RewriteViewHandler#getActionURL(...) will basically return the requested URL. This is done because the form should post back to the same rewritten URL and not to the plain JSF URL. But I don’t see how this could cause the problem you are describing.
I’ll try to summarize what happens:
You request the page WITH the view parameter, so the checkbox will be checked.
You uncheck the checkbox which will trigger a postback to the same URL that was originally requested (WITH the view parameter)
Your code triggers a redirect with “include-view-params=true” which will include the view parameters with the current values.
As far as I can tell the problem is in step 3. And I don’t think that Rewrite is involved here, is it? Or is RewriteViewHandler#getActionURL(...) called here?
Wouldn’t it solve your problem if you clear the bean property bound to the view parameter in step #3?
Do you play Magic?
Get TopDecked MTG, the #1 Magic App, built by players, for players. Free to use, forever.