Template.ref must search proto content when instance creation is underway.

R=arv
BUG=

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