You are correct. Here is the key to fixing that.
When you go through the Massachusetts interview, there is a page entitled "Taxable IRA/Keogh Distribution." This is where you can enter under "Contributions Previously Taxed by Massachusetts" the amount that should not be taxed.