Fix in sidebar-next functionality

The first item in sidebar was always selected, even if there were no new
messages. Now the sidebar-new function works as it should.