27805: Eliminate reliance on create_function()

DO NOT MERGE. For review only.