Refactor template bindings: Clone and bind instance nodes in single pass

R=arv
BUG=

Review URL: https://codereview.appspot.com/45840043