set f->unspecialized->env = NULL (fix #6597)
an unspecialized function should not share it's env variable with other closures.
this sets env to NULL in those cases to prevent invalid access,
and creates a new function with the proper env when attempting to call the unspecialized code.