title: $set does not change the value of the field in java driver for mongodb
body: <p>My collection is something like this:</p>
  
  <pre><code>{
  "_id" : ObjectId("597c4c42398593a7b464fc9c"),
  "userId" : NumberLong(2),
  "steps" : [ 
      {
          "_id" : ObjectId("597c4c42398593a7b464fc9a"),
          "beginningDate" : "2017-07-29T13:20:10.344",
          "state" : "Pending",
          "messages" : [ 
              {
                  "_id" : ObjectId("597c4c42398593a7b464fc9b"),
                  "content" : "Hi",
                  "isRead" : 0,
                  "side" : "UserToAdmin",
                  "creationDate" : "2017-07-29T13:20:10.344"
              }
          ]
      }, 
      {
          "_id" : ObjectId("597c4ce5398593aaa897ccb4"),
          "beginningDate" : "2017-07-29T13:22:53.884",
          "state" : "Open",
          "messages" : []
      }
  ],
  "lastStepState" : "Pending",
  "lastModified" : "2017-07-29T13:26:36.774"
  }
  </code></pre>
  
  <p>What I'm basically trying to do is whenever I push a new step into the steps array, I update the lastStepState in the following way:</p>
  
  <pre><code>Document updateQueryDoc = new Document("userId", userId).append("lastStepState",
                  new Document("$eq", State.Pending.name()));
          Document updateDoc = new Document("$push", new Document("steps", newStepDoc))
                  .append("$set", new Document("lastStepState", State.Open.name()))
                  .append("$set", new Document("lastModified", now));
  </code></pre>
  
  <p>(State is an enum with Pending and Open values)
  However, the lastStepState does not gets updated. what could be the problem?
  (I also should mention that there is one document in the collection, so using updateMany is not a soultion to my problem.)</p>