title: MongoDB updates incorrect array element
body: <p>Hello I have a document with some user records.</p>
  
  <pre><code>    "profile":{
       "records":[
                {
                  "classId":   "LngdsQfL",
                  "moduleId":  "5CDEezDJ",
                  "sectionId": "nFMu3mwa",
                  "dateFinished": "",
                  "dateOpened": "2017-11-15T19:48:20.819Z"
                },
                {
                  "classId":   "7Smq5sG",
                  "moduleId":  "5CDEezDJ",
                  "sectionId": "nFMu3mwa",
                  "dateFinished": "",
                  "dateOpened": "2017-11-15T19:19:08.669Z"
                }
              ]
        }
  </code></pre>
  
  <p>But when I am trying to update the second record the query updates the first one. And the second one stays the same.</p>
  
  <pre><code> var classId= "7Smq5sG";
   var moduleId = "5CDEezDJ";
   var sectionId = "nFMu3mwa";
   var date = new Date();
  
  Users.update(
                { _id:Meteor.userId() ,
  
                  'profile.records.classId' : classId,
                  'profile.records.moduleId' : moduleId,
                  'profile.records.sectionId' :  sectionId,
                },{
                $set : { 
                  "profile.records.$.dateOpened": date
                  }
               });
      }
  </code></pre>
  
  <p>What am I missing?</p>