Once _hasModifiedCount becomes false, there is no point ever looking for nModified again. You could short circuit the lookup:

if (_hasModifiedCount && result.hasField("nModified"))
    nModified += result.getIntField("nModified");
else
  _hasModifiedCount = false;

Also, you do technically walk the result object twice: once to check for the presence of the nModified field, and then another time to get its value. A very minor optimization but potentially going to happen frequently. Maybe see if you can avoid the repeated walk.