Merge "Add optional debug logging to on flag changes" into tm-qpr-dev