bug 16066

Hi,
This fixes bug 16066.

When the inline history tries to display the history and notes together and the
last note is younger then all history items the next_entry function
will go into an endless loop crashing the server