Fix an infinite search problem in entails due to module imports