fixes #12194 - join fact tables multiple times for each search term
scoped_search usually generates a new inner join for each search term when searching through a key/value table layout to correctly search for hosts via multiple facts. Since the change to ext_method in 3f8e6c33, a fixed table name was used. This is changed to multiple joins to match how scoped_search works with multiple search terms.
Related issues
Bug #12194: Can't search for multiple facts in foreman 1.10.0-RC1
fixes #12194 - join fact tables multiple times for each search term
scoped_search usually generates a new inner join for each search term
when searching through a key/value table layout to correctly search for
hosts via multiple facts. Since the change to ext_method in 3f8e6c33, a
fixed table name was used. This is changed to multiple joins to match
how scoped_search works with multiple search terms.