Fix buggy TestCase.setup_hooks