Added a check, when rendering the delete button, to see if there are pinned
queries, rather than just checking for other unpinned queries.