Convergent evolution is: