Impurity dephasing in a Bose-Hubbard model