If someone launched a nuke in space how would other nuclear powers react? I doubt they would assume "this is probably just an EMP and not a direct nuclear strike on our territory"
If you had time to plan it, you'd probably want to put the warhead on a satellite launched by a normal satellite launcher. It'll look benign until you detonate it.
I don't know how someone like me would even tell if this treaty is taken seriously. For example, going to space is really hard and has historically been somewhat unreliable at the best of times, which may mean that back in 1967 everyone was thinking "we don't even want a 1% chance that someone's failed launch to drop a 99%-usable warhead on a random location where some tiny country or organised crime group can find it".