Issue #3031130 by tim.plunkett: \Drupal\Core\KeyValueStore\MemoryStorage::rename() erases data if keys match (cherry picked from commit d70a4752)