Strange behaviour muting and soloing tracks

I recently created a large project with lots of grouped and frozen tracks and had some weird behaviour with the state of mute and solo buttons. This lead to tracks incorrectly being muted / soloed and the buttons displaying wrong values.

I’ve managed to replicate this using a much smaller setup.

  1. Create three MIDI tracks
  2. Create a group and put track 1, 2 in it
  3. Enter some MIDI on track 3 and freeze it

Then:

  1. Mute the group track (1 and 2 are muted)
  2. Solo track 2 (this mutes other tracks but sets the top level button above tracks to S)
  3. Mute all tracks using the button above all tracks
    (this clears mute and solo on all tracks)

We are now in a mess.
If you press mute all tracks again it does nothing.

There are a number of similar use cases when mixing usage of track level, group level, and all track level solos and mutes. I can get it ignoring mute / solo in different situations.