OK, I found System.IsPinnedToNamespaceTree at HKEY_CLASSES_ROOT\CLSID\{145A608A-48E1-452D-8604-F1CCB8BF299E}, @="iCloud Photos". I changed it from 1 to 0 and rebooted. The icon reappeared anyway. However, the registry key was gone, and I did not delete it. I searched again from the top, and I found a duplicate at HKEY_CLASSES_ROOT\CLSID\{10BFF74D-1C27-401C-B524-56CFB66610A1}. It couldn't have been there before, else my original search would have found it first, as it is lexicographically less than the other one. I changed its System.IsPinnedToNamespaceTree from 1 to 0 and rebooted, and finally, the icon did not appear. The registry key remained as well. Same for a second reboot. I copied the names of these registry keys directly from the .reg files I exported before making the changes, so they are the ones I found. The only differences in the .reg files is the key name. Weird.