fix flag bit definitions to make code from issue #11049 actually work; along the...