Array in "randomize with" constraint is not properly incrementing its index

In reply to aditya:

Actually I also have the variable msg_id inside the class packet.
I’m not sure if it have any effect on the bug.


class packet;
       int        msg_id; 
  rand bit [14:0] addr;
endclass