Only time i've seen this is when pump timing solenoid failed on the bottom of pump, but when i got full story was due to pump/engine being churned over for hours without any deisel so cam shoe roller in pump had broken up leaving metal particles in fuel as evidence. But i digress, If your sure And no offence meant that engine was okay before and you haven't removed pump then basic pump timing okay. Advance and retard on pump controlled by ecu/software taken from MAP or MAF and temp sensor readings. So either your current sw as CaptainZok says is wrong, could try loading earlier software or pump is not compatible due to different internal make up ie maybe no timing solenoid. Are part no's for ecu the same for original system and donor engine. If the same internal board and pin no's for inputs/outputs the same just a software programming issue. 
JUst a thought crossed my mind ( i know a very short journey ) Does your system use a water temp controlled cable to advance/retard pump for cold start. Old and basic but it works. If so is cable adjusted on pump correctly and does lever on pump move okay. As i said this is old school and would be suprised if your beemer engine has it 
The ECU is different, hence why I had to swap over loom. My one had MAF etc, not present on earlier one. The software is not flash updatable.
The guy said the engine was running fine 'with a small amount of top end noise' about a month ago when the gearbox failed.
Omegatoy had heard the engine running previous to that.
The piezo electrical connector on on eof the injectors had a different plug, so I modified to fit. Could these be different?
The ECU gets coolant temp from a electrical coolant sensor in head, alongside the dash one.