No, it is not related just to the list, but can also happen in other circumstances. When you have two different actions running on the same entity, and the first action removes the entity at some point, the second action must test the used entity properties - name, position and so on - in order to detect if the entity is still there. Removed entities have no name, no flags, position is zero, and also all other entity properties are nonexistent or zero.