Hi, Sorry for the delay.
The Solenoid on the back of the fuel rail is called the "Fuel Pressure Solenoid". The "Fuel Quantity Solenoid" is mounted to the injection pump.
It is attached to the connector on the right that I posted a pic of the two connectors that sometimes get the connectors swapped.
Here is a link showing an injection pump out of the vehicle, the solenoid to the far left is the Fuel Quantity Solenoid..
The Unit on the front of the fuel rail is the Fuel Rail Pressure Sensor. This could also be at fault if it is inaccurately reading the rail pressure.
Basically the diag for the pressure sensor is to monitor rail pressure with a scanner with the engine off. If the reading is more than plus or minus 200 psi with engine off, the sensor is bad and needs to be replaced. If I'm correct, this sensor only comes with a new Fuel Rail which will also come with a new fuel pressure solenoid.
You stated: " I can hold the throttle against the governor and it will run at 4000 to 4200 continually without going into limp mode which it would never do before but still goes into limp when hard accelerating."
This is because with engine under a no load condition the requirements are different for fuel delivery unloaded as opposed to being loaded under heavy acceleration while moving..