Fixed #18729 -- Added more precise use_distinct check for list_filter

Added check to get_filters to only flag query for distinct based on
list_filter if that list_filter is actually being used.
Queries using distinct can be *very slow* so should be avoided if
not needed.
You have the same docstring for 4 tests but they are obviously meant to test different things, so clarifying that would be helpful.