Toolbar icon appearance toggle

I have several toolbar icons that should indicate the status of a particular setting. An example is for

The DIESEL expression for setting the toolbar ican image appearance is
$(if,$(=,$(and,$(getvar,useri2),1),1),!.,)

The LISP function that the button calls is
(defun c:enco_set_decimal ( / temp) (setvar "USERI2" (+ (logand (getvar "USERI2") 12) 1)) (SETVAR "LUNITS" 2) (SETVAR "LUPREC" 8) (SETVAR "DIMLUNIT" 2) (SETVAR "DIMDEC" 8) (princ) )

If I click on that toolbar icon several times the appearance of the icon toggles. If the icon appearance followed the DIESEL code the appearance should stay the same rather than toggle.

Before I send a bug report I though I should bring this up here in case I'm missing something obvious.