fixes #3603: replaced a relation with a collection in 'where' conditions