Strange accidentals in first measure of coda

I have a very peculiar situation that looks like it must be a bug. See the attached graphic. In the first measure of the coda, if I put a C# concert in the trumpet part (any beat), Dorico shows a sharp. There has been no key change and C# is in the key signature, so I should not be showing a sharp there. This will only confuse the player. I realize I can force the accidental off, but that should not be necessary. This behavior occurs only in the first measure of the coda.

And notice in the trombone, an F# does NOT display an accidental, which is correct. For all notes, the accidental property is off.

Any idea what is going on here?

Not sure what is happening in your TO CODA bar but is the C# a cautionary?

There is a C natural in the bar before the Coda - I wonder if Dorico is seeing that and putting the # back in as a cautionary…

This surely just like 1st and 2nd time bars - Dorico doesn’t (yet) treat them like anything apart from the “next” bar, meaning that cautionaries will appear if contradictory accidentals appear in the “previous” bar.

Correct: Dorico doesn’t yet understand the repeat structure of the music sufficiently well to be able to handle the changes in musical state between two bars that are drawn consecutively but not played consecutively. (By the way, no other software does that, either, but I bet Dorico will be the first to do it, though it won’t be in the next major version.)

Ahhh. That’s it of course. My brain was ignoring the previous measure because it wasn’t really “previous.” Also I generally have my options set to parenthesize cautionaries, so it didn’t occur to me this would have been a cautionary. Apparently I did not set that option in this file. Thanks.