Fixed the direction of a sanity check comparison (which had been changed from !js_env in next to js_env != NULL by accident) in func.cc.