You are not binding the variable dynamically. Edit: A sorry, I see now that you actually have declared the variable to be dynamically bound. But I am keeping the part of the answer which assumes otherwise anyway, as it might help others.
lexical-binding is set to
let, and other forms, bind variables lexically by default - that's what that setting does.
let can bind some variables lexically and others dynamically. What it should do for a particular variable, it figures out by checking whether the variable has been defined, or at least declared to be defined. So add this:
(defvar implicit-layout-active nil)
You most certainly also want to add a package prefix to that symbol and maybe add a doc-string explaining that the variable is only intended to be let-bound.
If you already have such a definition, but get the above error anyway, then that is probably because you use the variable before defining it. The order might also be wrong due to the use of outdated
Instead of the above you have used:
I.e. you are declaring that the variable is defined, without actually making sure that there always is a binding. When you now evaluate some code which tries to get the value of the variable without it actually being bound dynamically, well then it is void.