Fix issue with single event rewrites, global rewrite flush when settings saved
Updats #27896
Merge remote-tracking branch 'origin/bugfix/27986-fix-rewrites' into develop