Fix bug in simplifier: was ignoring if targets.