I verified that I got the error without your workaround and that I don't get it with my (proper) fix.
My explanation (the commit message of fe6abbe):
When a lambda (closure) is quoted, the byte-compiler and/or
interpreter (probably, I haven't verified it) doesn't know that the
word variable is a lexical reference. When later invoking the lambda,
the word variable will be void as it was not detected as part of the
closure.
I verified that I got the error without your workaround and that I don't get it with my (proper) fix.
My explanation (the commit message of fe6abbe):