Retirement tax questions

"Is there a way to avoid this double-payment?"

Yes.

 MA has a rule to adjust for this.

I forget what the rule is so I will just tell you to read the instructions for your MA state tax return.