Internal flag changes value without prompting

Hi,

I use the internal flags to check whether trays are loaded or not. When setting the flags, the values are right, but when I add the subURCap, that does everything basically, some flags have the wrong value. I haven’t seen a false turn to true, but the opposite happens in almost every case (flag #1 keeps the good value, every other that I tested changed).

What could cause this?

Thanks,
Viktor