It's important to wait until the element's definition is ready before stamping the template. Elements defined with <polymer-element> are registered asynchronously, so the fix is to wrap the code in an event handler that waits for the 'polymer-ready' event. Here's an updated example:
More info: Node.bind allows elements to customize how they are bound. By default most elements bind to attributes and these bindings are 1-way. Polymer allows elements to expose published properties (those in the attributes attribute or publish block) which bind as properties and are two way. In order for this 2-way binding to be setup correctly, the element must be created with the proper definition so that it gets the right bind method implementation. If the element is bound when the definition is not available, then an attribute binding is created and it is 1-way.