Fix error introduced in b28b57b3 where sitemap only partially gets generated when max links settings are too low