Sometimes I get this problem also. To fix it, force alpha-blending on the object, like this:
Alpha-blended materials seem to work better with mip-mapping than masked materials do.
EntityFX fenceEntity, 16+32 ;16=Show backfaces 32=Force alpha-blending
Alpha-blended materials seem to work better with mip-mapping than masked materials do.