Breakdown of effective-medium theory by a photonic spin Hall effect