Compiler bug with unnamed enum type

I found a bug in the current (V. 1.6) pas2js compiler:

Define an unnamed enum type in a implementation part of a unit:

var
  modus      : (text_, grafik_);

and initialize it in the initialization part:

modus:=text_;

When testing the value like

  if modus=grafik_ then
    showmessage('grafik');
  if modus=text_ then
    showmessage('text');

you see that it shows both messages.

As an additional information and for workaround purpose:

When declaring this with a named enum type like the following

type
  tmodus      = (text_, grafik_);
var
  modus: tmodus;

it works correctly.

We have reported this to the pas2js team asking to address asap.