diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
index 80ba6efac..b19e8b346 100644
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -18119,6 +18119,13 @@ SaAisErrorT ImmModel::rtObjectUpdate(
             eduAtValToOs(&tmpos, &(p->attrValue.attrValue),
                 (SaImmValueTypeT)p->attrValue.attrValueType);
 
+            // [Lennart] To use a "doIt" variable to do different things in a
+            // loop depending on which iteration is very bad code but is legacy
+            // so not much to do for now (should at least be renamed to
+            // loopCount or similar. With that said, try to use as easy to read
+            // usage of this doIt. Example: if (doIt == 0 ... is much easier to
+            // read than !doIt. Also doIt is not a boolean and ! should only be
+            // used with booleans
             if (!doIt && (attr->mFlags & SA_IMM_ATTR_NO_DUPLICATES) &&
                 (multiattr->hasMatchingValue(tmpos))) {
               LOG_NO(
@@ -18127,6 +18134,10 @@ SaAisErrorT ImmModel::rtObjectUpdate(
                   "call. Object:'%s'.", attrName.c_str(), objectName.c_str());
               err = SA_AIS_ERR_INVALID_PARAM;
               break;  // out of for switch
+              // [Lennart] Here if (doIt) should be if (doIt > 0). It much
+              // clearer says that the if shall be done in the first iteration
+              // and that the else shall be done in all other iterations
+              // and again doIt is not a boolean
             } else if (doIt){
               multiattr->setExtraValue(tmpos);
             }
