Bug report: snap undoes xmodmap

Just used snap for the first time, and was unpleasantly surprised to find it undid my xmodmap key remapping. This is the first time in the few years since I set it up that it’s been undone, so I do think there is something out of the ordinary here.

At least it appears to be a one-time thing, though. After restoring the mapping, I removed and reinstalled the package, and the reinstallation left my keys alone.

The specific command was sudo snap install dmd --classic. I would tend to guess the particular package wouldn’t matter, but --classic does seem like it might.

The mappings are:
xmodmap -e "keycode 20 = apostrophe quotedbl apostrophe quotedbl"
xmodmap -e "keycode 48 = underscore minus underscore minus"
(done in .xinitrc)

This is on Kubuntu 18.04.4.