Regarding putting on Tefillin on Chol Hamo'ed, after mentioning the opinions which say to put them on and those who say not to, and those who say to say the blessing in a whisper, the Mishna Berurah says
one should have in mind the following stipulation: If he is obligated to wear tefillin he is putting them on for the sake of the mitzvah but if he is not obligated then he is putting them on without intent for the mitzvah
" ואם לאו אין אני מניחן לשם מצוה" He must think a formula explicitly denying any intention of performing for the mitzvah. As the M"B continues when explaining why this works, "שאינו מכוין בהנחתם לשם מצוה ודאי" that the individual specifically does not have the intention of wearing them for the sake of the mitzvah.
How is it possible to have kavannah that he is fulfilling an obligation and, at the same time, that he is actively NOT fulfilling a mitzvah if the obligation doesn't exist? The opposing viewpoint doesn't say that "there is no positive obligation" but "it is forbidden" so he must have in mind specifically NOT fulfilling anything through his actions -- an idea which I find difficult to understand on its own.
In this other case (page 28) of fulfilling Zachor through a reading on what might or might not be the right date, we either have intent or don't have the positive intent, but we do not need a pro-active negative intent; there is nothing saying that we cannot be yotzei from the action even if the condition is not met (while the proper date for Zachor is set, there is nothing Assur about being yotzei through the hearing on a different date, as noted on this page).
Are there other obligations (which require kavannah) which can be fulfilled if I have, to any degree, the active intention of not fulfilling the obligation? How can I even hold two opposite kavannot in my head and claim to be abiding by both at the same time?