fix via ansible/ansible 30e6a65

Adapting [this patch](https://github.com/ansible/ansible/commit/30e6a659aeadc698a1bb22a7f9dcfd4eb074ccc2) to our ansible repo — original bug can be found [here](https://github.com/ansible/ansible/issues/8021#issuecomment-49244577). File structure has changed since we forked, so it couldn't be pulled/patched straight in from the original author.