Filter by application context makes sure that the rules returned by the report definition are part of the ruleset and ruleset versions that comprise this application. If A-B-D is class in a ruleset which is not part of the current user's application, then the report would not retrieve this class in its results.
pr_sys_app_hierarchy_flat table should have the application information to join against. The pr_sys_app_ruleset_index table has the relevant ruleset and versions which can used to join with the ruleset and version of the rules being filtered.
Entries in the pr_sys_app_ruleset_index table are inserted by the Pega platform engine code when the application is created / modified with the rulesets and ruleset versions including the built-on application.
Make sure there are no maxlimits being applied to the db queries, and make sure lookuplist cache isn't causing confusion. Does your SMA have a way to clear lookup cache?
The reason maxlimits can sometimes be an issue is if you have a huge number of ruleset versions so that the relevant ones sometimes aren't included in the db query results because of the maxlimit. /Eric