In the 2014 film Into the Woods, Rapunzel's hair did not work because the Witch had already touched it (presumably during her imprisonment/upbringing in the tower).
I heard something about "But I compared it to corn" and I assume they found some other hair on the corn but why should this hair work and not the hair the Baker's Wife had cut? Furthermore, how could the Witch not have known that her own "daughter's" hair was the ingredient she needed?