Commands: Only use ambient context on same project

Fixes #990