Fix depredcated "in" for binomial expansion.
Address review comment
Add a test
Merge pull request #2125 from raoulb/fix_3831

Fix deprecated "in" for binomial expansion.