In certain cases we may want to remove any empty sections after the references lists have been removed.
This currently should only happen if the section would be empty after the removal of the references lists inside this section. This should only happen if this is a section towards the end of the page and not anything inside an infobox or other table.
Some reference lists may not be in the last section(s). While they wouldn't appear in the "structure" part of the response they would still be in the references dictionary part of the response.
We want this inside the references output so clients can rebuild these sections with reference lists based on that information.