Also check for closures in hook registration

Change-Id: Icd75e99dcab73c34ce578f6b8f73389a20aab197