domain: Fix joining to a subclass and querying the base class.