[PATCH] #7595: Static flags code needs cleanup