fix infinite loop in isValidCF with indirect