add invalid flag for BPStructs (fix issue 5790) this flag will be set on loading a state and checked before every rendering.