Fix: foreachHostWithRole() was overwriting variables