Backport "Fix in [] to be false, in [] to be true"

This is in response to discussion at rails/rails#9216
The original commit was in response to discussion on 62207fa