Query String caching could cause matched_filters not working

PR for #4361.

When searching with a query containing query_strings inside a bool query, the specified _name is randomly missing from the results due to caching.