The contribution of massive haloes to the matter power spectrum in the presence of AGN feedback