Complete fix for adding seen string values

diff --git a/src/smile/java/org/codehaus/jackson/smile/SmileGenerator.java b/src/smile/java/org/codehaus/jackson/smile/SmileGenerator.java
index 15ba4d5..7f100d2 100644
--- a/src/smile/java/org/codehaus/jackson/smile/SmileGenerator.java
+++ b/src/smile/java/org/codehaus/jackson/smile/SmileGenerator.java
@@ -2100,10 +2100,12 @@
                 _seenStringValues = new SharedStringNode[MAX_SHARED_STRING_VALUES];
                 final int mask = MAX_SHARED_STRING_VALUES-1;
                 for (SharedStringNode node : old) {
-                    for (; node != null; node = node.next) {
+		    while (node != null) {
                         int ix = node.value.hashCode() & mask;
+			SharedStringNode next = node.next;
                         node.next = _seenStringValues[ix];
                         _seenStringValues[ix] = node;
+			node = next;
                     }
                 }
             }