There's a race between FLUSH LOGS and binlog-group commit for Binlog-checkpoint notification which must be done *after* the committed group transactions' affected
data are flushed to disk. However the notification may happen before that fore the reason
FLUSH LOGS handler does to acquire necessary mutexes.
A test case follows with a patch to be committed soon.