don't show 'first' when link is same as 'previous' button

figured later i should have fixed the 'first' button as well, no point in showing it when the back button points to the same page.
Merge pull request #1367 from sjopet/patch-5

don't show 'first' when link is same as 'previous' button