fix(engine): Fix intermediate throwing compensation with activityRef for task activities

related to #CAM-1410