Allowing user functions to work in command-line scripts, this will probably break...