Mongo Version 3.2.6 and 3.6.0
Consider two below document
db.col.insert({ b:[ { k: 0, v: 0 }, { k: 1, v: 0 } ], c: [0] });
db.col.insert({ b:[ { k: 0, v: 0 }, { k: 1, v: 0 } ], a: [0] });
Update query
db.col.update({"b.k": 1,"c": 0}, {'$set': {'b.$.v': 1}}); -- doesn't work - incorrectly updates the first document in array b
db.col.update({"b.k": 1,"a": 0}, {'$set': {'b.$.v': 1}}); -- works
Find after above updates
{ "b" : [ { "k" : 0, "v" : 1 }, { "k" : 1, "v" : 0 } ], "c" : [ 0 ] }
{ "b" : [ { "k" : 0, "v" : 0 }, { "k" : 1, "v" : 1 } ], "a" : [ 0 ] }