Hookable: fix in the max listeners checking, and initial tests for it.