Also capture function name in function object

Before, it was only capturing the function body and parameter list.