I’m not sure, as it shouldn’t have worked before (creating a new tensor has always detached the output from the computation graph), and there is also an open issue 9, which describes the same error.
I’m really not sure, if the code was working at some point or if the author used another code base to write the blog post.
In the comments one user seems to have forked his code (link 5), which does not contain the recreation of the tensor.