A bad EGR valve or gasket can act like a broken vacuum line on a Intake.
The PCU & engine doesn't like unmetered air, so DTC's will be thrown.
Some Technicians will use a smoke test, others may use a spray brake cleaner to pin point umetered air leaks, while the engine is running.