Fixes #1622: Lua function script not called for SF >= 8