Added failing test for complex filter with N:M 'through' association. 

Covers issue #2150