Malformed chords with supermodal augmented seventh

If the scale of any supermode contains an augmented seventh relative to the current key, all chords using that note would be corrupted as the note is lowered by twelve flats. This only happens on relative key changes. One way to reproduce it is as follows:

  • Input a #V chord in Major through the chord search panel.
  • Switch to any relative mode.
  • Switch back to the relative Major. This produces the following chord scale.

The last chord is supposed to be ♯viio instead of what is shown here. The differences before and after the key change are more obvious when the chord is copied: (only the JSON for the chord itself is shown)

  • Before: {"root":5,"beat":1,"duration":4,"type":5,"inversion":0,"applied":0,"adds":[],"omits":[],"alterations":[],"suspensions":[],"pedal":null,"alternate":"","borrowed":[1,3,5,6,8,10,12],"isRest":false,"recordingEndBeat":null}
  • After: {"root":5,"beat":1,"duration":4,"type":5,"inversion":0,"applied":0,"adds":[],"omits":[],"alterations":[],"suspensions":[],"pedal":null,"alternate":"","borrowed":[1,3,5,6,8,10,0],"isRest":false,"recordingEndBeat":null}

The 7th borrowed degree wraps around for the second chord but not the first; I believe everything should “just” work without the wrap-around. These malformed chords seem to break score export, so a bug fix is justified even though these distant chords are rarely used in practice.