See #927 test case test_qb_filter_13.
Originally I was trying to write an expression for counting users in overlapping sets. So when I used the std.union() to merge a group's users with a User subquery I got an unexpected error TypeError: issubclass() arg 2 must be a class, a tuple of classes, or a union