Bugfix: fixed inheritance breaks filtering if relations are included (issue #3610)