when creating a new itemframe entity, the var tmp is used to transfer information about texture and node. If the entity creation fails, either because minetest.add_entity fails or because there is another itemframe entity on this pos already, tmp is not cleared. This means that the next itemframe entity loading will read from tmp and thus will use the wrong item. It will even keep the wrong texture during reload because the texture information is stored in the entities metadata...
when creating a new itemframe entity, the var `tmp` is used to transfer information about texture and node. If the entity creation fails, either because `minetest.add_entity` fails or because there is another itemframe entity on this pos already, `tmp` is not cleared. This means that the next itemframe entity loading will read from `tmp` and thus will use the wrong item. It will even keep the wrong texture during reload because the texture information is stored in the entities metadata...