Localization effects in dephasing experiments