Fix stray ol and section end tag if only one article was displayed.

We already check if loop.length > 1 before outputting <section> and <ol>
tags, but we neglected to do the same check when outputting the corresponding
end tags.