Named local function definitions are moved to the top level, to avoid the need to generate closures.