You said you pulled the vacuum hose off of the EGR and that it made no difference but then you replaced the EGR solenoid and it's fixed. If the solenoid was bad (stuck open) it would allow vacuum to the EGR when you don't want it there. Unplugging the vacuum hose removes the vacuum source.