Extra check before setting a filter: if the filter is empty, set it directly to the mapLayer (no point in transforming an empty filter for a joined/related feature). Now setting a filter works the same for joined/related features as normal features