The app.goto() function will not work as expected in pbx_lua in Asterisk 1.8. If you must use app.goto() you must manually return control back to asterisk using return from the dialplan extension function, otherwise execution will continue after the call to app.goto(). Calls to app.goto() should work as expected in Asterisk 1. 10 but still should not be necessary in most cases.
In Asterisk 1.8, use return
function extension_function(c, e)
return app.goto("default", "100", 1)
-- without that 'return' the rest of the function would execute normally
app.verbose("Did you forget to use 'return'?")