Fix for a part of #1032

This fixes the sitemap being built useless twice.