Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlor.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlor.java	(date 1472016168000)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlor.java	(revision )
@@ -35,6 +35,10 @@
 
 public class DocumentBundlor {
     /**
+     * Prefix used for various meta properties used for bundling
+     */
+    public static final String BUNDLOR_META_PROP_PREFIX = ":doc-";
+    /**
      * Hidden property to store the pattern as part of NodeState
      * TODO - Also store the NodeType
      */
Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java	(date 1472016168000)
+++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java	(revision )
@@ -49,7 +49,6 @@
 import org.apache.jackrabbit.oak.spi.state.NodeStateDiff;
 import org.apache.jackrabbit.oak.spi.state.NodeStateUtils;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -498,7 +497,6 @@
 
     }
 
-    @Ignore("FIXEME")
     @Test
     public void recreatedBundledNode() throws Exception{
         NodeBuilder builder = store.getRoot().builder();
@@ -567,6 +565,42 @@
 
         //New pattern should be effective
         assertTrue(hasNodeProperty("/test/book.jpg", concat("metadata", DocumentBundlor.META_PROP_NODE)));
+        assertFalse(hasNodeProperty("/test/book.jpg", concat("comments", DocumentBundlor.META_PROP_NODE)));
+    }
+
+    @Test
+    public void bundlingPatternRemovedAndBundledNodeRecreated() throws Exception{
+        NodeBuilder builder = store.getRoot().builder();
+        NodeBuilder fileNode = newNode("nt:file");
+        fileNode.child("jcr:content").setProperty("jcr:data", "foo");
+        builder.child("test").setChildNode("book.jpg", fileNode.getNodeState());
+        merge(builder);
+
+        assertTrue(hasNodeProperty("/test/book.jpg", concat("jcr:content", DocumentBundlor.META_PROP_NODE)));
+
+        //Delete the bundled node structure
+        builder = store.getRoot().builder();
+        builder.child("test").child("book.jpg").remove();
+        merge(builder);
+
+        //Change bundling pattern
+        builder = store.getRoot().builder();
+        NodeBuilder ntfile = childBuilder(builder, BundlingConfigHandler.CONFIG_PATH+"/nt:file");
+        ntfile.remove();
+        merge(builder);
+
+        //Create a new node with same path
+        builder = store.getRoot().builder();
+        fileNode = newNode("nt:file");
+        fileNode.child("jcr:content").setProperty("jcr:data", "foo");
+        fileNode.child("metadata").setProperty("jcr:data", "foo");
+        fileNode.child("comments").setProperty("jcr:data", "foo");
+        builder.child("test").setChildNode("book.jpg", fileNode.getNodeState());
+        merge(builder);
+
+        //New pattern should be effective
+        assertNotNull(getNodeDocument("/test/book.jpg"));
+        assertFalse(hasNodeProperty("/test/book.jpg", concat("metadata", DocumentBundlor.META_PROP_NODE)));
         assertFalse(hasNodeProperty("/test/book.jpg", concat("comments", DocumentBundlor.META_PROP_NODE)));
     }
 
Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlorUtils.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlorUtils.java	(date 1472016168000)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlorUtils.java	(revision )
@@ -26,6 +26,7 @@
 
 import javax.annotation.Nonnull;
 
+import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -35,6 +36,13 @@
 import static org.apache.jackrabbit.oak.plugins.document.bundlor.DocumentBundlor.META_PROP_NODE;
 
 public final class BundlorUtils {
+    public static final Predicate<PropertyState> NOT_BUNDLOR_PROPS = new Predicate<PropertyState>() {
+        @Override
+        public boolean apply(PropertyState input) {
+            return !input.getName().startsWith(DocumentBundlor.BUNDLOR_META_PROP_PREFIX);
+        }
+    };
+
 
     public static Map<String, PropertyState> getMatchingProperties(Map<String, PropertyState> props, Matcher matcher){
         if (!matcher.isMatch()){
Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java	(date 1472016168000)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java	(revision )
@@ -124,7 +124,10 @@
             removeDeletedChildProperties(state, childContext);
         } else {
             childContext = getBundlorContext(childPath, state);
+            if (childContext.isBundling()){
+                removeBundlingMetaProps(state, childContext);
-        }
+            }
+        }
         return new BundlingHandler(registry, childContext, childPath, state);
     }
 
@@ -148,6 +151,15 @@
         return true;
     }
 
+    @Override
+    public String toString() {
+        String result = path;
+        if (isBundledNode()){
+            result = path + "( Bundling root - " + getRootBundlePath() + ")";
+        }
+        return result;
+    }
+
     private String childPath(String name){
         return PathUtils.concat(path, name);
     }
@@ -172,8 +184,19 @@
             String propName = ps.getName();
             //In deletion never touch child status related meta props
             //as they are not to be changed once set
-            if (!propName.startsWith(DocumentBundlor.HAS_CHILD_PROP_PREFIX))
+            if (!propName.startsWith(DocumentBundlor.HAS_CHILD_PROP_PREFIX)) {
                 childContext.removeProperty(ps.getName());
+            }
+        }
+    }
+
+    private static void removeBundlingMetaProps(NodeState state, BundlingContext childContext) {
+        //Explicitly remove meta prop related to bundling as it would not
+        //be part of normal listing of properties and hence would not be deleted
+        //as part of diff
+        PropertyState bundlorConfig = state.getProperty(DocumentBundlor.META_PROP_PATTERN);
+        if (bundlorConfig != null){
+            childContext.removeProperty(DocumentBundlor.META_PROP_PATTERN);
         }
     }
 
Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java	(date 1472016168000)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java	(revision )
@@ -218,7 +218,9 @@
     @Nonnull
     @Override
     public Iterable<? extends PropertyState> getProperties() {
-        return properties.values();
+        //Filter out the meta properties related to bundling from
+        //generic listing of props
+        return Iterables.filter(properties.values(), BundlorUtils.NOT_BUNDLOR_PROPS);
     }
 
     @Override
