Memoize the local creation of UDFs

...e UDF for each value and running out of perm-gen when processing large amounts of data.