Otherwise, a host in two groups, A and B, using a variable defined in group A and all will get the value of all, as B's variables will include the all variable. Partially fixes #1647.