generate_dependencies only determines the dependencies for tasks and exported shell variables. As a result, shell functions run from non-task contexts won't necessarily get their dependent shell functions emitted, and the exec_func may fail. Potentially, exec_func could be altered to determine dependencies on demand when run from a non-task context (event handler, setscene function, etc), or exec_func could emit everything rather than the subset of the shell functions in that situation. See https://gist.github.com/4254324 for a class which exhibits a failure, and the failure encountered. I actually hit this doing real work, so it's not entirely a theoretical problem.
Patch out for review on bitbake-devel for this.