Aha! I see the problem. If a bar has "D.S. al 3rd end" but ends with a single rather than a double barline, the instruction seems to be ignored during playback.

So there's something magic about double barlines. Can you explain the rules for how the player treats barlines? Also, it seems to me that it is possible for two bars to be separated by two barlines, which you would do by putting one after the first bar and another before the second. That seems weird for me, and I would think there is no reason ever to do it; but perhaps you could tell me if that ability is intended to be useful and, if so, what its effect is?