title: Observable loses value after call to applyBindings
body: <p>I am working on this <a href="http://jsfiddle.net/StrandedPirate/yjhz6bvj/" rel="nofollow noreferrer">fiddle</a> trying to isolate a problem I'm having with the value not being set on a <code>select</code> element and now I'm stuck with nonsensical behavior in jsfiddle. I can't tell if this issue is my underlying problem or if this is a bug in jsfiddle.</p>
  
  <p>First I'm using inheritance with my view models as described here: <a href="http://www.bennadel.com/blog/1566-using-super-constructors-is-critical-in-prototypal-inheritance-in-javascript.htm" rel="nofollow noreferrer">Using Super Constructors Is Critical In Prototypal Inheritance In Javascript </a>. Perhaps this article has led me down the wrong path, I don't know. Bottom line is that I need to do inheritance. </p>
  
  <p>Second the problem with this particular fiddle is that after the call to <code>ko.applyBindings</code> my observable just loses its value (becomes <code>undefined</code>) and then out of no where gets set to <code>1</code>.</p>
  
  <p><img src="https://i.stack.imgur.com/0EOUZ.png" alt="enter image description here"></p>
  
  <pre><code>function userAddressModelBase(data) {
      var self = this;
      self.states = ko.observableArray(data.states);
  }
  
  userAddressModel.prototype = new userAddressModelBase({});
  userAddressModel.constructor = userAddressModel;
  
  function userAddressModel(data) {
      var self = this;
  
      userAddressModelBase.call(self, data);
  
      self.sampleText = ko.observable("i'm here");
  
      console.log("data.selectedStateId is: " + data.selectedStateId);
      self.selectedStateId = ko.observable(data.selectedStateId);
      console.log("self.selectedStateId is: " + self.selectedStateId());
  
      self.getStates = function () {
          console.log("getStates running...");
          window.setTimeout(function () {
              console.log("getStates callback...");
              self.states([new stateModel({
                  id: 1,
                  name: "New York"
              }), new stateModel({
                  id: 2,
                  name: "Texas"
              }), new stateModel({
                  id: 3,
                  name: "California"
              }), new stateModel({
                  id: 4,
                  name: "Ohio"
              })]);
              console.log(ko.toJS(self));
              console.log("getStates callback self.selectedStateId is: " + self.selectedStateId());
          }, 1000);
      };
  
      //console.log("self.selectedStateId is: " + self.selectedStateId());
      //self.getStates();
      //console.log("self.selectedStateId is: " + self.selectedStateId());
  }
  
  function stateModel(data) {
      var self = this;
      self.id = ko.observable(data.id);
      self.name = ko.observable(data.name);
  }
  
  var model = new userAddressModel({ selectedStateId: 3 });
  
  console.log(ko.toJS(model));
  console.log("before applyBindings model.selectedStateId is: " + model.selectedStateId());
  console.log("appling bindings...");
  ko.applyBindings(model); // selectedStateId is now undefined!!!
  console.log("appling bindings finished.");
  console.log(ko.toJS(model));
  
  console.log("after applyBindings model.selectedStateId is: " + model.selectedStateId());
  model.getStates(); // selectedStateId is now 1 after this finishes!!!
  </code></pre>