Fix premature failure in allow_if rule checking