Optimizer Generating Incorrect Paths For looped flow