The side-mission code apparently assumes that the scientist is in "Investigate" mode when he gets there, and if he's in some other state it fails outright.
Because he was completely blocked by a stationary guard, the scientist did a Look Around in place and cleared his own investigation point. This is normal behavior for guards that have an interest point that they're unable to path to. This allowed the scientist to successfully exit the Investigate status despite not reaching his destination.
When you distracted the stationary guard (by opening the door), the scientist was finally able to go to the compile room. (In addition to the investigation point, he's assigned to be "stationary" in the target square, so still wanted to go there.)
This provides a rare, but fully vanilla, way for the scientist to reach his objective in the Idle/patrolling state, which the code doesn't know how to handle.
game/sim/level.lua:187: dlc1/escape_mission.lua:361: attempt to call method 'markInterestInvestigated' (a nil value)
stack traceback:
dlc1/escape_mission.lua:361: in function <dlc1/escape_mission.lua:344>
stack traceback:
[C] in function 'assert'
game/sim/level.lua:187 in function 'resumeHook'
game/sim/level.lua:169 in function 'onTrigger'
game/sim/engine.lua:1923 in function 'triggerEvent'
game/sim/engine.lua:727 in function 'warpUnit'
game/sim/engine.lua:900 in function 'oldMoveUnit'
workshop-1745350836/simengine.lua:211 in function 'oldMoveUnit'
workshop-2151835746/engine.lua:134 in function 'moveUnit'
game/sim/btree/actions.lua:713 in function 'oldExecutePath'
workshop-569390373/actions.lua:140 in function 'executePath'
game/sim/btree/actions.lua:890 in function 'update'
game/sim/btree/btree.lua:57 in function 'tick'
https://discord.com/channels/313015356052471828/313015356052471828/1163334480145154118
Diagnosis: