The cookie remains with its previous value. After some testing it turns out that Firefox is getting annoyed with the "path" attribute. Removing that makes the cookie go away properly.
It's apparently more complicated. The path attribute is okay, as long as it is the same as the path used when setting the cookie (or subset?).