$exists in steps/mail/list.inc was zero even if Junk folder contained messages. I have deleted the database cache manually and issue disappeared. So it looks like it has cached a message count of zero which was never updated. I don't have an answer yet why this happened.
This should fix the issue.
https://github.com/roundcube/roundcubemail/commit/9eda939676fe4a027a229e76d4...
As far as I can see it should really fix it definitely. Thank you! I'll keep you posted.