--- core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php.orig	2019-02-20 20:35:01.000000000 +0200
+++ core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php	2019-02-27 17:09:40.772004185 +0200
@@ -364,12 +364,6 @@
         $row->setIdMap($id_map);
       }
 
-      // Clear any previous messages for this row before potentially adding
-      // new ones.
-      if (!empty($this->currentSourceIds)) {
-        $this->idMap->delete($this->currentSourceIds, TRUE);
-      }
-
       // Preparing the row gives source plugins the chance to skip.
       if ($this->prepareRow($row) === FALSE) {
         continue;
@@ -381,6 +375,11 @@
       // 3. The row is newer than the current highwater mark.
       // 4. If no such property exists then try by checking the hash of the row.
       if (!$row->getIdMap() || $row->needsUpdate() || $this->aboveHighwater($row) || $this->rowChanged($row)) {
+        // Clear any previous messages for this row before potentially adding
+        // new ones.
+        if (!empty($this->currentSourceIds)) {
+          $this->idMap->delete($this->currentSourceIds, TRUE);
+        }
         $this->currentRow = $row->freezeSource();
       }
 
