Changes in clef and key signature on save/reload with system changes involved
1) Create piano score with four measures
2) Change barline at end of second measure to an End-Start Repeat
3) Select third measure in bass, and set treble clef
Note that the clef is now inserted between an End Repeat and a Start Repeat barline. This result is hidden if the end-start falls at the end of a line, as it just looks like a courtesy clef.
Functional work-around is to place the clef before the first note of the measure, although this may not be as desirable as having it appear before the measure.
HOWEVER, if the score is uploaded to musescore.com then a clef before the first note is treated the same as a clef before the measure. See for example. measure 10 of https://musescore.com/user/4151271/scores/6575333