Added local opt Phi(Pin,...,Pin) -> Pin(Phi(...)).