Allow filter model to be a subclass of the queryset one.
Merged #1398 against 2.4 branch.
Remove duplicated model declaration.
Merge pull request #1778 from linovia/bugfix/1398

Bugfix/1398