If you have old unread notifications and more than 25 read notifications, it is possible for the badge to show a positive number but the flyout/popup doesn't include any unread notifications.
|mediawiki/extensions/Echo : wmf/1.28.0-wmf.9||Sort bundled notifications by read status AND timestamp|
|mediawiki/extensions/Echo : master||Sort bundled notifications by read status AND timestamp|
Checked in betalabs - the notifications are sorted by their status and their timestamp. e.g. If #of notiifcations(read and unread) >25, unread notifications will be displayed on top of the list. If # of unread notifications >25, as soon as you click 'mark all as read', the unread notifications from the "next pages" will be displayed at the top.