fix(builtin/macros): test whether there is an accidental variable capture in 'obtain' macro applications

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>