[idl] fix mismatch in if/endif terms