BufferListPanel: improve the first/last item detection logic
Version 0.4