fix #24041: Pitches incorrect after inserting measures before key signature/clef change