Have you mistakenly not defined materials as I had?
Since the links no longer render for context here is the original post: