Role of environmental correlations in the non-Markovian dynamics of a spin system