Check the position of the mast butt on the cabin sole. It HAS to be 1" back from the angle down in the floor. This has a huge impact on mast prebend/rig tune-every 1/2" back in mast butt position pushes the top of the untensioned rig forward about two feet-so when the rig is tightened, the headstay will have way too much sag, and the mast will have way too much prebend.
Also-check that your lowers are also at 40 (I'm sure they are, but just in case...)