When messages are sorted newest at bottom of list, the toolbar "Go to Next Unread message" button will not find an unread message that's in the message list above the currently highlighted message. The next button only finds unread messages after its current position.
When there bottom of the current folder is reached, CM proceeds to the next folder with new/unread messages and will eventually come back to the first folder to read any remaining new/unread messages there.
However, if there are only new/unread messages in the current folder that appear above the currently selected message, then the Next button does not select an unread message, but stays where it is.
A similar thing happens when messages are sorted "newest first", but now messages below the currently selected one won't be found.
'Next' means next. You can add a 'go to previous unread message' button if you want a previous unread message