diff --git a/.gitignore b/.gitignore
index c124c74bfe..4f2d1cb48b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,4 +14,6 @@ test/sourcemaps/samples/*/output.js.map
_actual.*
_actual-bundle.*
src/generators/dom/shared.ts
-package-lock.json
\ No newline at end of file
+package-lock.json
+.idea/
+*.iml
diff --git a/src/generators/dom/preprocess.ts b/src/generators/dom/preprocess.ts
index 93e7126afa..a93b2b4048 100644
--- a/src/generators/dom/preprocess.ts
+++ b/src/generators/dom/preprocess.ts
@@ -225,7 +225,7 @@ const preprocessors = {
);
listNames.set(node.context, listName);
- const context = generator.getUniqueName(node.context);
+ const context = block.getUniqueName(node.context);
const contexts = new Map(block.contexts);
contexts.set(node.context, context);
diff --git a/test/hydration/samples/each-block-arg-clash/_after.html b/test/hydration/samples/each-block-arg-clash/_after.html
new file mode 100644
index 0000000000..36cd79642a
--- /dev/null
+++ b/test/hydration/samples/each-block-arg-clash/_after.html
@@ -0,0 +1,5 @@
+
+ - animal
+ - vegetable
+ - mineral
+
\ No newline at end of file
diff --git a/test/hydration/samples/each-block-arg-clash/_before.html b/test/hydration/samples/each-block-arg-clash/_before.html
new file mode 100644
index 0000000000..36cd79642a
--- /dev/null
+++ b/test/hydration/samples/each-block-arg-clash/_before.html
@@ -0,0 +1,5 @@
+
+ - animal
+ - vegetable
+ - mineral
+
\ No newline at end of file
diff --git a/test/hydration/samples/each-block-arg-clash/_config.js b/test/hydration/samples/each-block-arg-clash/_config.js
new file mode 100644
index 0000000000..3efdf81cec
--- /dev/null
+++ b/test/hydration/samples/each-block-arg-clash/_config.js
@@ -0,0 +1,31 @@
+export default {
+ data: {
+ things: {
+ foo: [
+ 'animal',
+ 'vegetable',
+ 'mineral'
+ ]
+ }
+ },
+
+ snapshot(target) {
+ const ul = target.querySelector('ul');
+ const lis = ul.querySelectorAll('li');
+
+ return {
+ ul,
+ lis
+ };
+ },
+
+ test(assert, target, snapshot) {
+ const ul = target.querySelector('ul');
+ const lis = ul.querySelectorAll('li');
+
+ assert.equal(ul, snapshot.ul);
+ assert.equal(lis[0], snapshot.lis[0]);
+ assert.equal(lis[1], snapshot.lis[1]);
+ assert.equal(lis[2], snapshot.lis[2]);
+ }
+};
diff --git a/test/hydration/samples/each-block-arg-clash/main.html b/test/hydration/samples/each-block-arg-clash/main.html
new file mode 100644
index 0000000000..b093160f6a
--- /dev/null
+++ b/test/hydration/samples/each-block-arg-clash/main.html
@@ -0,0 +1,5 @@
+
+ {{#each things.foo as foo}}
+ - {{foo}}
+ {{/each}}
+