Fix group_by: do not group a host for which a condition is false

Given the following playbook, compare the output of the command ``ansible-playbook -i host1,host2,host3 testplaybook.yml`` when using devel branch and when applying this PR's commit.
I think the behaviour of ansible is as expected when it is applied.

    ---
    - name: test group_by
      hosts: all
      gather_facts: no
      tasks:
        - name: group by something
          action: group_by key=foo
          when: >
              '1' in inventory_hostname
    
    - name: foo members
      hosts: foo
      gather_facts: no
      tasks:
        - action: debug msg={{inventory_hostname}}