fix #138. Discovery if cached discovery result is invalid. If policy is invalid, it will stop mapping instead of invalid policy.