Fixed strange static var access bug

For safety, made all static accesses for such flags standard.