Save and restore main specification object to prevent overwrites when processing lists (GH #54).