When and why mimicry is facilitated and attenuated