Correct handling of IN operator argument

Filter with IN operator was not working, due to i,j,k being treated as a
single string. Added casting to address this, and extended a test to
check it.