Wrap unhandled errors from lookups in an AnsibleError
Wrap unhandled errors from lookups in an AnsibleError

This provides better error handling, and prevents errors like KeyError
from bubbliing up to code in odd places.

Fixes #17482

thaim/ansible,thaim/ansible