Problem with message block mechanism

I discovered a problem with stuck notes. The message-counter/skipping mechanism repeats the last note of the previous block. I've documented the fix and provided a sample for experimenting/confirming.