Function expression can be assigned to a variable and be given a name. Ensure function name is the reduced variable before clearing it out. fixes #1573 fixes #1575