Fixed adding redundant apphooks when APPHOOKS is set