GitHub #161: Fix marshalling of inputs for user-defined code