I have added test menu-6.17 to Tk 8.6 for this issue and merged it to 8.7.

I then created a bug-14a9b62e1d branch with the proposed fix.