Fix infinite loop when there are sticky posts.