Resolve scoping issues for multiple spies

Fixes #3