The EGR and Sec AIR switchover valves are both on the front of the head and both use the same vacuum source. I would be sure the vacuum line has good vacuum and that the outputs aren't switched. The two systems work at different times.
Bosch Master, ASE Master, L1
33 years MB technician