find_by with association objects does not bind values correctly fix

Fix for the issue #16884 
@chancancode let me know your opinion this.