Fix using associated objects in where clauses. #203.