The BSON serializer in the PHP driver will encode an array with the "BSON array" type if its keys are consecutive integers starting from zero (i.e. 0,1,2,3,4...). If you take the result of array_values() and remove elements from it, then it will instead be encoded with the "BSON object" type. See
PHP-104. MongoDB 2.6 introduces stricter validation to the $in operator: values for $in that are not of BSON array type are rejected.
Assuming you are indeed using unset() or equivalent, I'd classify this issue as a dup of
PHP-104. You're encountering it all of a sudden now because of stricter validation that was introduced in the server, but fundamentally it stems from the design of the PHP driver API. Instead of adding more calls to array_values(), you could instead take the recommendation in PHP-104 and just remove elements with array_splice() instead.