Only resolve user macros (vars.*) recursively.

Fixes #5983