Fix #384: make Dispatcher accept scalar record arguments

I'd say this is a huge (!!!). I guess this is related to the function not keeping a reference to whatever owns the memory containing the generated code. My guess is that when going through the dispatcher, the dispatcher keeps the appropriate reference. What I wonder is if this is a possible source of leaks.