Fix to preserve an unsafe variable when accessing through an intermediary variable from hostvars. (cherry picked from commit 2936b80dbb)
2936b80dbb