Lua functions no longer linger.

Function change also triggers lua close, after which valid functions are
registered.