As DoubleAA has reminded me, the Mishna in Pesachim 2:5 forbids the usage of matzah that is tevel or heqdesh on the evening of Pesach. In his commentary on Nedarim 2:2, however, the Bartenura appears to suggest that it is merely a mitzvah that comes from an 'aveirah. As none of the super-commentaries appear to have a problem with this, how best might one understand that passage in the Bartenura?
For context, the mishna there says that one may make a vow that forbids him from utilising his sukkah, waving the four species and laying tefillin, but may not make an oath that prevents him from doing so (אמר: קונם סוכה שאני עושה, לולב שאני נוטל, תפלין שאני מניח - בנדרים אסור, בשבועות מותר שאין משבעין לעבור על המצות). Obviously, saying that one may vow to abstain from such things doesn't mean that one is necessarily permitted to do so, but that the vow stands.
In his commentary on the Mishna, Rambam implies that one should nevertheless still sit in the sukkah, wave the four species and lay tefillin, but that this would then obligate him to bring a qorban. Rav Ovadiah of Bertinoro explains similarly, and notes that it would be accounted a mitzvah that comes from an 'aveirah. To my confusion, the Bartinura then likens it to somebody who only has matzah of tevel or heqdesh on the evening of Pesach.
Seeing as the mishna in Pesachim forbids one from utilising such matzah at all, why would the Bartenura suggest that it is similar to somebody who makes a vow that precludes him from using the sukkah, and who then uses it and brings a qorban?