Make sure that no extra inserting is done if the strategy changes.
diff --git a/deflate.c b/deflate.c
index 0ba984d..98c4d6e 100644
--- a/deflate.c
+++ b/deflate.c
@@ -1606,6 +1606,7 @@
             FLUSH_BLOCK(s, 0);
         }
     }
+    s->insert = 0;
     if (flush == Z_FINISH) {
         FLUSH_BLOCK(s, 1);
         return finish_done;
@@ -1914,6 +1915,7 @@
         }
         if (bflush) FLUSH_BLOCK(s, 0);
     }
+    s->insert = 0;
     if (flush == Z_FINISH) {
         FLUSH_BLOCK(s, 1);
         return finish_done;
@@ -1952,6 +1954,7 @@
         s->strstart++;
         if (bflush) FLUSH_BLOCK(s, 0);
     }
+    s->insert = 0;
     if (flush == Z_FINISH) {
         FLUSH_BLOCK(s, 1);
         return finish_done;