Use a dictionary to eliminate the inner loop in _choose_host_filters()

it looks like an o(n²) algorithm, we can use a dictionary to eliminate
the inner loop.

Change-Id: I32747120ae1f2f1bc0a3810a03e0cd9baa7a8d2c
Merge "Use a dictionary to eliminate the inner loop in _choose_host_filters()"