Properly cache parent/child queries in the case they are wrapped in a compound filter.
Closes #2971