The problem is that byte-compile--reify-function which puts the bindings inside the closure bindings inside the function body as an optimization, puts them in front of the docstring and (interactive ...) form. Here is a fix: