Fix to not raise index when using the thumbnail and first image
function on the same page. This results in not showing the second
picture in the content