Natural accidental doesn't automatically come up for natural notes after a natural-sharp/natural-flat one
Make, in the same measure, a group of notes which are the same pitch and have no accidental. Attach a sharp/flat to the first one, and a natural accidental is automatically attached to the second one. This doesn't happen if you attach a natural-sharp/natural-flat to the first one.
I doubt that this error is from line 2086 in libmscore/note.cpp, but I cannot find anything questionable.