I thought this must be just one line or one function. I stared at the code and the database, and didn't get what's the point of the matter.
Sorry. I just could reproduce it, but didn't know why it works that way.
From the unread posts page (on this website), I can no longer use the Mark As Read "All" functionality. I'm guessing this is a development bug?
Thanks for reporting fixed in https://github.com/NodeBB/NodeBB/commit/aa30973f0a628bd2de91741c483b2a23a28e913d