As described by Bas in
When looking at the lazyload feature and scrolling back to older messages, in most cases it works as expected. But sometimes it simply does not load the older messages (in Chrome and in Safari). I have uploaded a gif in this issue showing the problem. However that issue seems unrelated to the fix you have added.