Changes from calling the global parseHookCall() function to looking up the hook declaration on the environment.