Merge "Add logging to detect flags set by tests" into main