--- libntfs-3g/index.c.ref	2015-03-14 15:10:12.000000000 +0100
+++ libntfs-3g/index.c	2015-11-03 10:18:05.558363800 +0100
@@ -1175,8 +1175,8 @@
 			 * index, we may have to move the root to an extent
 			 */
 		if ((errno == ENOSPC)
-		    && !ctx->al_entry
-		    && !ntfs_inode_add_attrlist(icx->ni)) {
+		    && (ctx->al_entry
+			|| !ntfs_inode_add_attrlist(icx->ni))) {
 			ntfs_attr_put_search_ctx(ctx);
 			ctx = (ntfs_attr_search_ctx*)NULL;
 			ir = ntfs_ir_lookup(icx->ni, icx->name, icx->name_len,
