semantic: Support functions nested in functions nested in functions.