fix(engine/compensate): resolve activityRef in correct scope

handle cases where referenced activity
* is part of parent scope
* is part of a nested scope

closes #CAM-1409