Flags is the name of an internal PBP variable. Try changing the name to
something else. It should work fine then.