Mechanistic origin of ligand-controlled regioselectivity in Pd-catalyzed C-H activation/arylation of thiophenes.