Is this a bug in EPDM Dispatch?

I have a Dispatch script that will only run if a datacard variable is a particular value.

The first time I run it the correctly detects the invaild datacard variable and displays the error message I put in the script.

The problem is that if I immediately run the Dispatch script a second time on the same file then is fails to detect the invalid datacard variable and will excute the rest of the script.

Any ideas if this is just a bug or am I doing the 'test' in my script incorrectly?

SolidworksSolidworks Pdm enterprise Pdm