Using Set Static Mesh function randomly returns false and doesn't change the static mesh.

I’d take a look in the log, just after you’ve done it. Maybe there’s something useful there.