diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts
index 2810f2cbd1..779029a5d8 100644
--- a/src/generators/dom/index.ts
+++ b/src/generators/dom/index.ts
@@ -122,10 +122,10 @@ export default function dom(
@dispatchObservers( this, this._observers.pre, newState, oldState );
${block.hasUpdateMethod && `this._fragment.update( newState, this._state );`}
@dispatchObservers( this, this._observers.post, newState, oldState );
- ${generator.hasComplexBindings &&
- `while ( this._bindings.length ) this._bindings.pop()();`}
${(generator.hasComponents || generator.hasIntroTransitions) &&
`this._flush();`}
+ ${generator.hasComplexBindings &&
+ `while ( this._bindings.length ) this._bindings.pop()();`}
`;
if (hasJs) {
@@ -219,10 +219,10 @@ export default function dom(
this._fragment.${block.hasIntroMethod ? 'intro' : 'mount'}( options.target, null );
}
- ${generator.hasComplexBindings &&
- `while ( this._bindings.length ) this._bindings.pop()();`}
${(generator.hasComponents || generator.hasIntroTransitions) &&
`this._flush();`}
+ ${generator.hasComplexBindings &&
+ `while ( this._bindings.length ) this._bindings.pop()();`}
${templateProperties.oncreate &&
deindent`
diff --git a/test/js/samples/non-imported-component/expected-bundle.js b/test/js/samples/non-imported-component/expected-bundle.js
index 06e2ea9a7d..cdcd2607bd 100644
--- a/test/js/samples/non-imported-component/expected-bundle.js
+++ b/test/js/samples/non-imported-component/expected-bundle.js
@@ -191,6 +191,7 @@ function SvelteComponent ( options ) {
this._fragment.create();
this._fragment.mount( options.target, null );
}
+
this._flush();
}
diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js
index c4ebb32172..87c7e4b5b1 100644
--- a/test/js/samples/non-imported-component/expected.js
+++ b/test/js/samples/non-imported-component/expected.js
@@ -70,6 +70,7 @@ function SvelteComponent ( options ) {
this._fragment.create();
this._fragment.mount( options.target, null );
}
+
this._flush();
}
diff --git a/test/runtime/samples/oncreate-before-bindings/Nested.html b/test/runtime/samples/oncreate-before-bindings/Nested.html
new file mode 100644
index 0000000000..9b5a838cb4
--- /dev/null
+++ b/test/runtime/samples/oncreate-before-bindings/Nested.html
@@ -0,0 +1,30 @@
+{{#each things as thing}}
+ {{thing}} ({{visibilityMap[thing]}})
first thing (true)
second thing (true)