wrong taxation for on residents of MA with respect to capital gains

I am a Florida resident filing a Massachusetts Form 1-NR/PY as a nonresident. TurboTax incorrectly calculated state tax on my capital gains, even though the gains are not Massachusetts-sourced. I correctly allocated $0 MA-source income in the nonresident worksheet, but Line 28 on Form 1-NR/PY still calculated capital gains tax. This violates MA DOR sourcing rules. The only fix was manual override or filing outside TurboTax. Please review your state apportionment logic for MA nonresident returns.