Make sure set_fact variables go into VARS_CACHE

Fixes #8758