Revert "Simplify this code by simply copying the receiver code into the hook"

This reverts commit ded5bddb3af4b3021ebde0a69d4ea8b4a305dc37.