Fix hidden imports of hooks not being analyzed for hooks