It seems that when ensure_nodetree_previews calls duplicate_material, ntreeLocalize removes the muted node from the copy of the nodetree, so later in ensure_nodetree_previews nodeFindNodebyName can't find it and therefore parent is NULL. With this change, the muted node just doesn't get its preview updated. Pull Request: https://projects.blender.org/blender/blender/pulls/122776