This allows it to be replaced for testing.
These don't affect client visibility.
Hooks are now called exactly once per contact.