The if-problem in automatic differentiation