only add a hook if it has not already be added (adding the same hook twice is now silently ignored)