test for D2487 - query with predicate failing on inheritance entities