Modify the code that emits the module flags to use the new module flags accessor