Rewrite hooks test

- Hooks is not longer recursive
- Bugfix: hooks.modules kept modules which failed import
- Test is not unit test, but the sequence matters