Bind params properly when using nested hash and collection proxy in where clause.

It always couldn't bind params correctly when passing a nested hash in where clause and the hash value is a collection proxy. Collection proxy's bind values doesn't been concated to the main relation.

Fixes #16238.

Example:
```ruby
    # Before
    Author.includes(:posts => :comments).where(comments: { post: Author.first.posts }).to_a.size
    # => 0 in sqlite
    # => Raise errors in mysql & postgresql

    # After
    Author.includes(:posts => :comments).where(comments: { post: Author.first.posts }).to_a.size
    # => 1
```