R' Chaim Brisker's explains that the psul of mitzvah haba'ah b'aveira is a disqualification of the cheftza shel mitzvah. One proof: according to the Rambam listening to tekiyos from a stolen shofar is not a mitzvah haba'ah b'aveira because the cheftza shel mitzvah is the sound produced by the shofar, not the shofar itself.
Given this framework, my son said over a nice chakirah from R' Baruch Ber: if one ate stolen food on the first night of sukkos, would that be a mitzvah haba'ah b'aveira? Is the cheftza shel mitzvah the sukkah, or since there is a unique chiyiuv on the first night to eat a k'zayis (as we discussed last week) in the sukkah, it is the food which is the cheftza shel mitzvah?
I think the answer depends on the machlokes Rishonim regarding whether there is a mitzvah on the first night to eat a k'zayis in the sukkah even in the rain: According to the Rambam who opines that there is no chiyuv in the rain, that chiyuv to eat a k'zayis is just a means of fulfilling yeshivas sukkah -- where the mitzvah of sukkah does not apply (e.g. in the rain), there is no chiyuv to eat. The cheftza shel mitzvah according to this view would be the sukkah. However, according to those Rishonim who hold one must eat a k'zayis in the sukkah even in the rain, the chiyuv is one of the eating, not one of sukkah; hence there is no exemption because of rain. The cheftza shel mitzvah according to this view would be the food. In short, what the cheftza shel mitzvah is depends on whether you define the special mitzvah on the first night as one of achila or dirah.