I might be wrong, but my gut says that you may run into NSImage caching problems. The system caches images if you do not change the image settings (usually this is not the best approach to the image that you want to reuse) or just create a new one or download it from the package.
You may need to create a new image from scratch, create some kind of background (what you got from your button segment), then draw the text. Otherwise, the system caches something elsewhere, which sometimes leads to undefined (or at least unexpected) behavior.
source share