Don't run all tests if lookup fails

Otherwise just get a segfault