Use hook classes as proxies rather than extending hook blocks.

* Fixes #799.