Add missing Flush() call in the CompatLogger class

fixes #7511